The loading/saving options that are specific for TIFF were in the form of wxIMAGE_OPTION_<name> while all other non-generic options use the form wxIMAGE_OPTION_<imagetype>_<name>. Renamed the TIFF options to the form wxIMAGE_OPTION_TIFF_<name> and kept the old names for backwards compatibility.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68780
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/versioninfo.h"
// defines for wxImage::SetOption
#include "wx/versioninfo.h"
// defines for wxImage::SetOption
-#define wxIMAGE_OPTION_BITSPERSAMPLE wxString(wxT("BitsPerSample"))
-#define wxIMAGE_OPTION_SAMPLESPERPIXEL wxString(wxT("SamplesPerPixel"))
-#define wxIMAGE_OPTION_COMPRESSION wxString(wxT("Compression"))
-#define wxIMAGE_OPTION_IMAGEDESCRIPTOR wxString(wxT("ImageDescriptor"))
+#define wxIMAGE_OPTION_TIFF_BITSPERSAMPLE wxString(wxT("BitsPerSample"))
+#define wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL wxString(wxT("SamplesPerPixel"))
+#define wxIMAGE_OPTION_TIFF_COMPRESSION wxString(wxT("Compression"))
+#define wxIMAGE_OPTION_TIFF_IMAGEDESCRIPTOR wxString(wxT("ImageDescriptor"))
+
+// for backwards compatibility
+#define wxIMAGE_OPTION_BITSPERSAMPLE wxIMAGE_OPTION_TIFF_BITSPERSAMPLE
+#define wxIMAGE_OPTION_SAMPLESPERPIXEL wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL
+#define wxIMAGE_OPTION_COMPRESSION wxIMAGE_OPTION_TIFF_COMPRESSION
+#define wxIMAGE_OPTION_IMAGEDESCRIPTOR wxIMAGE_OPTION_TIFF_IMAGEDESCRIPTOR
class WXDLLIMPEXP_CORE wxTIFFHandler: public wxImageHandler
{
class WXDLLIMPEXP_CORE wxTIFFHandler: public wxImageHandler
{
*/
if ( TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &spp) )
{
*/
if ( TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &spp) )
{
- image->SetOption(wxIMAGE_OPTION_SAMPLESPERPIXEL, spp);
+ image->SetOption(wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL, spp);
}
if ( TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bpp) )
{
}
if ( TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bpp) )
{
- image->SetOption(wxIMAGE_OPTION_BITSPERSAMPLE, bpp);
+ image->SetOption(wxIMAGE_OPTION_TIFF_BITSPERSAMPLE, bpp);
}
if ( TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compression) )
{
}
if ( TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compression) )
{
- image->SetOption(wxIMAGE_OPTION_COMPRESSION, compression);
+ image->SetOption(wxIMAGE_OPTION_TIFF_COMPRESSION, compression);
}
// Set the resolution unit.
}
// Set the resolution unit.
- int spp = image->GetOptionInt(wxIMAGE_OPTION_SAMPLESPERPIXEL);
+ int spp = image->GetOptionInt(wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL);
- int bpp = image->GetOptionInt(wxIMAGE_OPTION_BITSPERSAMPLE);
+ int bpp = image->GetOptionInt(wxIMAGE_OPTION_TIFF_BITSPERSAMPLE);
- int compression = image->GetOptionInt(wxIMAGE_OPTION_COMPRESSION);
+ int compression = image->GetOptionInt(wxIMAGE_OPTION_TIFF_COMPRESSION);
if ( !compression )
{
// we can't use COMPRESSION_LZW because current version of libtiff
if ( !compression )
{
// we can't use COMPRESSION_LZW because current version of libtiff