X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b47c832e5529dc6c632536b4665a005f0a85aec8..10a2749bd77bd41435e9873087772e1ea4ec76a2:/src/tiff/tif_codec.c?ds=sidebyside diff --git a/src/tiff/tif_codec.c b/src/tiff/tif_codec.c index 8b87b80d84..cb9f6d7021 100644 --- a/src/tiff/tif_codec.c +++ b/src/tiff/tif_codec.c @@ -91,6 +91,7 @@ TIFFCodec _TIFFBuiltinCODECS[] = { { "CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 }, { "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG }, { "Deflate", COMPRESSION_DEFLATE, TIFFInitZIP }, + { "AdobeDeflate", COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP }, { "PixarLog", COMPRESSION_PIXARLOG, TIFFInitPixarLog }, { "SGILog", COMPRESSION_SGILOG, TIFFInitSGILog }, { "SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog }, @@ -110,7 +111,40 @@ _notConfigured(TIFF* tif) static int NotConfigured(TIFF* tif, int scheme) { - tif->tif_setupdecode = _notConfigured; - tif->tif_setupencode = _notConfigured; - return (1); + (void) scheme; + + tif->tif_decodestatus = FALSE; + tif->tif_setupdecode = _notConfigured; + tif->tif_encodestatus = FALSE; + tif->tif_setupencode = _notConfigured; + return (1); } + +/************************************************************************/ +/* TIFFIsCODECConfigured() */ +/************************************************************************/ + +/** + * Check whether we have working codec for the specific coding scheme. + * + * @return returns 1 if the codec is configured and working. Otherwise + * 0 will be returned. + */ + +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; +} +