]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use COMPRESSION_LZW by default, it's not implemented in our own libtiff (patch...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 17 Apr 2006 01:54:10 +0000 (01:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 17 Apr 2006 01:54:10 +0000 (01:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/imagtiff.cpp

index 4c09339ca7683b09147b7b0d7ce00017f132fe62..08174ddd8eef58f7f48683071ba381b9885288f2 100644 (file)
@@ -393,7 +393,13 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
 
     int compression = image->GetOptionInt(wxIMAGE_OPTION_COMPRESSION);
     if ( !compression )
-        compression=COMPRESSION_LZW;
+    {
+        // we can't use COMPRESSION_LZW because current version of libtiff
+        // doesn't implement it ("no longer implemented due to Unisys patent
+        // enforcement") and other compression methods are lossy so we
+        // shouldn't use them by default -- and the only remaining one is none
+        compression = COMPRESSION_NONE;
+    }
 
     TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, spp);
     TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bpp);