X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc038829d566f4e0cfdb249fac1e67db8456e347..8e8a4e8587b7642018f18b96adf04a7f69d0a829:/src/common/imagtiff.cpp diff --git a/src/common/imagtiff.cpp b/src/common/imagtiff.cpp index 4c09339ca7..4db167ecbb 100644 --- a/src/common/imagtiff.cpp +++ b/src/common/imagtiff.cpp @@ -11,18 +11,20 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif -#include "wx/defs.h" - #if wxUSE_IMAGE && wxUSE_LIBTIFF #include "wx/imagtiff.h" -#include "wx/bitmap.h" -#include "wx/debug.h" -#include "wx/log.h" -#include "wx/app.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/intl.h" + #include "wx/bitmap.h" +#endif + extern "C" { #include "tiff.h" @@ -30,15 +32,14 @@ extern "C" } #include "wx/filefn.h" #include "wx/wfstream.h" -#include "wx/intl.h" #include "wx/module.h" #ifndef TIFFLINKAGEMODE - #if defined(__WATCOMC__) && defined(__WXMGL__) - #define TIFFLINKAGEMODE cdecl - #else - #define TIFFLINKAGEMODE LINKAGEMODE - #endif + #if defined(__WATCOMC__) && defined(__WXMGL__) + #define TIFFLINKAGEMODE cdecl + #else + #define TIFFLINKAGEMODE LINKAGEMODE + #endif #endif //----------------------------------------------------------------------------- @@ -393,7 +394,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);