]> git.saurik.com Git - wxWidgets.git/blobdiff - src/tiff/tif_codec.c
Applied patch [ 1736135 ] AUI: Clicking caption ignored on centered panel
[wxWidgets.git] / src / tiff / tif_codec.c
index 8b87b80d8443b245f2ff415d7ca08028f37cbda6..cb9f6d7021e9c9834f8674ac65cb1163db3d756b 100644 (file)
@@ -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;
+}
+