本文整理汇总了C++中TIFFFindCODEC函数的典型用法代码示例。如果您正苦于以下问题:C++ TIFFFindCODEC函数的具体用法?C++ TIFFFindCODEC怎么用?C++ TIFFFindCODEC使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TIFFFindCODEC函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TIFFNoEncode
static int
TIFFNoEncode(TIFF* tif, char* method)
{
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
if (c)
TIFFError(tif->tif_name, "%s %s encoding is not implemented",
c->name, method);
else
TIFFError(tif->tif_name,
"Compression scheme %u %s encoding is not implemented",
tif->tif_dir.td_compression, method);
return (-1);
}
示例2: TIFFSetCompressionScheme
int
TIFFSetCompressionScheme(TIFF* tif, int scheme)
{
const TIFFCodec *c = TIFFFindCODEC(scheme);
tif->tif_setupdecode = _TIFFtrue;
tif->tif_predecode = _TIFFNoPreCode;
tif->tif_decoderow = _TIFFNoRowDecode;
tif->tif_decodestrip = _TIFFNoStripDecode;
tif->tif_decodetile = _TIFFNoTileDecode;
tif->tif_setupencode = _TIFFtrue;
tif->tif_preencode = _TIFFNoPreCode;
tif->tif_postencode = _TIFFtrue;
tif->tif_encoderow = _TIFFNoRowEncode;
tif->tif_encodestrip = _TIFFNoStripEncode;
tif->tif_encodetile = _TIFFNoTileEncode;
tif->tif_close = _TIFFvoid;
tif->tif_seek = _TIFFNoSeek;
tif->tif_cleanup = _TIFFvoid;
tif->tif_defstripsize = _TIFFDefaultStripSize;
tif->tif_deftilesize = _TIFFDefaultTileSize;
tif->tif_flags &= ~TIFF_NOBITREV;
/*
* Don't treat an unknown compression scheme as an error.
* This permits applications to open files with data that
* the library does not have builtin support for, but which
* may still be meaningful.
*/
return (c ? (*c->init)(tif, scheme) : 1);
}
示例3: _notConfigured
static int
_notConfigured(TIFF* tif) {
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
TIFFError(tif->tif_name,
"%s compression support is not configured", c->name);
return (0);
}
示例4: _notConfigured
static int
_notConfigured(TIFF* tif)
{
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
char compression_code[20];
sprintf( compression_code, "%d", tif->tif_dir.td_compression );
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"%s compression support is not configured",
c ? c->name : compression_code );
return (0);
}
示例5: TIFFSetCompressionScheme
int
TIFFSetCompressionScheme(TIFF* tif, int scheme) {
const TIFFCodec* c = TIFFFindCODEC((uint16) scheme);
_TIFFSetDefaultCompressionState(tif);
/*
* Don't treat an unknown compression scheme as an error.
* This permits applications to open files with data that
* the library does not have builtin support for, but which
* may still be meaningful.
*/
return (c ? (*c->init)(tif, scheme) : 1);
}
示例6: TIFFNoDecode
static int
TIFFNoDecode(TIFF* tif, char* method)
{
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
if (c)
TIFFError(tif->tif_name, GetString(IDS_NO_DECODING),
c->name, method);
else
TIFFError(tif->tif_name,
GetString(IDS_NO_COMPRESSION_SCEME_DECODING),
tif->tif_dir.td_compression, method);
return (-1);
}
示例7: TIFFIsCODECConfigured
int
TIFFIsCODECConfigured(uint16 scheme) {
const TIFFCodec* codec = TIFFFindCODEC(scheme);
if (codec == NULL) {
return 0;
}
if (codec->init == NULL) {
return 0;
}
if (codec->init != NotConfigured) {
return 1;
}
return 0;
}
示例8: TIFFNoEncode
static int
TIFFNoEncode(TIFF* tif, char* method)
{
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
if (c) {
if (! strncmp(c->name, "LZW", 3) ){
TIFFError(tif->tif_name,
"%s %s encoding is no longer implemented due to Unisys patent enforcement",
c->name, method);
} else {
TIFFError(tif->tif_name, "%s %s encoding is not implemented",
c->name, method);
}
}
else {
TIFFError(tif->tif_name,
"Compression scheme %u %s encoding is not implemented",
tif->tif_dir.td_compression, method);
}
return (-1);
}
示例9: TIFFNoEncode
static int
TIFFNoEncode(TIFF* tif, char* method)
{
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
if (c) {
if (! strncmp(c->name, "LZW", 3) ){
TIFFError(tif->tif_name,
GetString(IDS_GENERIC_NO_LZW),
c->name, method);
} else {
TIFFError(tif->tif_name, GetString(IDS_NO_ENCODING),
c->name, method);
}
}
else {
TIFFError(tif->tif_name,
GetString(IDS_NO_COMPRESSION_SCHEME),
tif->tif_dir.td_compression, method);
}
return (-1);
}
示例10: TIFFPrintDirectory
//.........这里部分代码省略.........
if (TIFFFieldSet(tif,FIELD_POSITION))
fprintf(fd, " Position: %g, %g\n",
td->td_xposition, td->td_yposition);
if (TIFFFieldSet(tif,FIELD_BITSPERSAMPLE))
fprintf(fd, " Bits/Sample: %u\n", td->td_bitspersample);
if (TIFFFieldSet(tif,FIELD_SAMPLEFORMAT)) {
fprintf(fd, " Sample Format: ");
switch (td->td_sampleformat) {
case SAMPLEFORMAT_VOID:
fprintf(fd, "void\n");
break;
case SAMPLEFORMAT_INT:
fprintf(fd, "signed integer\n");
break;
case SAMPLEFORMAT_UINT:
fprintf(fd, "unsigned integer\n");
break;
case SAMPLEFORMAT_IEEEFP:
fprintf(fd, "IEEE floating point\n");
break;
case SAMPLEFORMAT_COMPLEXINT:
fprintf(fd, "complex signed integer\n");
break;
case SAMPLEFORMAT_COMPLEXIEEEFP:
fprintf(fd, "complex IEEE floating point\n");
break;
default:
fprintf(fd, "%u (0x%x)\n",
td->td_sampleformat, td->td_sampleformat);
break;
}
}
if (TIFFFieldSet(tif,FIELD_COMPRESSION)) {
const TIFFCodec* c = TIFFFindCODEC(td->td_compression);
fprintf(fd, " Compression Scheme: ");
if (c)
fprintf(fd, "%s\n", c->name);
else
fprintf(fd, "%u (0x%x)\n",
td->td_compression, td->td_compression);
}
if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) {
fprintf(fd, " Photometric Interpretation: ");
if (td->td_photometric < NPHOTONAMES)
fprintf(fd, "%s\n", photoNames[td->td_photometric]);
else {
switch (td->td_photometric) {
case PHOTOMETRIC_LOGL:
fprintf(fd, "CIE Log2(L)\n");
break;
case PHOTOMETRIC_LOGLUV:
fprintf(fd, "CIE Log2(L) (u',v')\n");
break;
default:
fprintf(fd, "%u (0x%x)\n",
td->td_photometric, td->td_photometric);
break;
}
}
}
if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) {
fprintf(fd, " Extra Samples: %u<", td->td_extrasamples);
sep = "";
for (i = 0; i < td->td_extrasamples; i++) {
switch (td->td_sampleinfo[i]) {
case EXTRASAMPLE_UNSPECIFIED:
示例11: TIFFPrintDirectory
//.........这里部分代码省略.........
if (TIFFFieldSet(tif,FIELD_POSITION))
fprintf(fd, " Position: %g, %g\n",
td->td_xposition, td->td_yposition);
if (TIFFFieldSet(tif,FIELD_BITSPERSAMPLE))
fprintf(fd, " Bits/Sample: %u\n", td->td_bitspersample);
if (TIFFFieldSet(tif,FIELD_SAMPLEFORMAT)) {
fprintf(fd, " Sample Format: ");
switch (td->td_sampleformat) {
case SAMPLEFORMAT_VOID:
fprintf(fd, "void\n");
break;
case SAMPLEFORMAT_INT:
fprintf(fd, "signed integer\n");
break;
case SAMPLEFORMAT_UINT:
fprintf(fd, "unsigned integer\n");
break;
case SAMPLEFORMAT_IEEEFP:
fprintf(fd, "IEEE floating point\n");
break;
case SAMPLEFORMAT_COMPLEXINT:
fprintf(fd, "complex signed integer\n");
break;
case SAMPLEFORMAT_COMPLEXIEEEFP:
fprintf(fd, "complex IEEE floating point\n");
break;
default:
fprintf(fd, "%u (0x%x)\n",
td->td_sampleformat, td->td_sampleformat);
break;
}
}
if (TIFFFieldSet(tif,FIELD_COMPRESSION)) {
const TIFFCodec* c = TIFFFindCODEC(td->td_compression);
fprintf(fd, " Compression Scheme: ");
if (c)
fprintf(fd, "%s\n", c->name);
else
fprintf(fd, "%u (0x%x)\n",
td->td_compression, td->td_compression);
}
if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) {
fprintf(fd, " Photometric Interpretation: ");
if (td->td_photometric < NPHOTONAMES)
fprintf(fd, "%s\n", photoNames[td->td_photometric]);
else {
switch (td->td_photometric) {
case PHOTOMETRIC_LOGL:
fprintf(fd, "CIE Log2(L)\n");
break;
case PHOTOMETRIC_LOGLUV:
fprintf(fd, "CIE Log2(L) (u',v')\n");
break;
default:
fprintf(fd, "%u (0x%x)\n",
td->td_photometric, td->td_photometric);
break;
}
}
}
if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) {
fprintf(fd, " Extra Samples: %u<", td->td_extrasamples);
sep = "";
for (i = 0; i < td->td_extrasamples; i++) {
switch (td->td_sampleinfo[i]) {
case EXTRASAMPLE_UNSPECIFIED:
示例12: TIFFPrintDirectory
//.........这里部分代码省略.........
if (TIFFFieldSet(tif,FIELD_POSITION))
fprintf(fd, " Position: %g, %g\n",
td->td_xposition, td->td_yposition);
if (TIFFFieldSet(tif,FIELD_BITSPERSAMPLE))
fprintf(fd, " Bits/Sample: %u\n", td->td_bitspersample);
if (TIFFFieldSet(tif,FIELD_SAMPLEFORMAT)) {
fprintf(fd, " Sample Format: ");
switch (td->td_sampleformat) {
case SAMPLEFORMAT_VOID:
fprintf(fd, "void\n");
break;
case SAMPLEFORMAT_INT:
fprintf(fd, "signed integer\n");
break;
case SAMPLEFORMAT_UINT:
fprintf(fd, "unsigned integer\n");
break;
case SAMPLEFORMAT_IEEEFP:
fprintf(fd, "IEEE floating point\n");
break;
case SAMPLEFORMAT_COMPLEXINT:
fprintf(fd, "complex signed integer\n");
break;
case SAMPLEFORMAT_COMPLEXIEEEFP:
fprintf(fd, "complex IEEE floating point\n");
break;
default:
fprintf(fd, "%u (0x%x)\n",
td->td_sampleformat, td->td_sampleformat);
break;
}
}
if (TIFFFieldSet(tif,FIELD_COMPRESSION)) {
const TIFFCodec* c = TIFFFindCODEC(td->td_compression);
fprintf(fd, " Compression Scheme: ");
if (c)
fprintf(fd, "%s\n", c->name);
else
fprintf(fd, "%u (0x%x)\n",
td->td_compression, td->td_compression);
}
if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) {
fprintf(fd, " Photometric Interpretation: ");
if (td->td_photometric < NPHOTONAMES)
fprintf(fd, "%s\n", photoNames[td->td_photometric]);
else {
switch (td->td_photometric) {
case PHOTOMETRIC_LOGL:
fprintf(fd, "CIE Log2(L)\n");
break;
case PHOTOMETRIC_LOGLUV:
fprintf(fd, "CIE Log2(L) (u',v')\n");
break;
default:
fprintf(fd, "%u (0x%x)\n",
td->td_photometric, td->td_photometric);
break;
}
}
}
if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) {
fprintf(fd, " Extra Samples: %u<", td->td_extrasamples);
sep = "";
for (i = 0; i < td->td_extrasamples; i++) {
switch (td->td_sampleinfo[i]) {
case EXTRASAMPLE_UNSPECIFIED: