X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ba9ea7267f57804d18e9371a7b12995dfd21417..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/common/imagtiff.cpp?ds=inline diff --git a/src/common/imagtiff.cpp b/src/common/imagtiff.cpp index 71da4fdfb3..0e31879a4e 100644 --- a/src/common/imagtiff.cpp +++ b/src/common/imagtiff.cpp @@ -343,9 +343,9 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo image->HasOption(wxIMAGE_OPTION_RESOLUTIONY) ) { TIFFSetField(tif, TIFFTAG_XRESOLUTION, - image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONX)); + (float)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONX)); TIFFSetField(tif, TIFFTAG_YRESOLUTION, - image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONY)); + (float)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONY)); } int spp = image->GetOptionInt(wxIMAGE_OPTION_SAMPLESPERPIXEL); @@ -394,8 +394,6 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,TIFFDefaultStripSize(tif, (uint32) -1)); - uint8 bitmask; - unsigned char *ptr = image->GetData(); for ( int row = 0; row < image->GetHeight(); row++ ) { @@ -411,7 +409,6 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo for ( int column = 0; column < linebytes; column++ ) { uint8 reverse = 0; - bitmask = 1; for ( int bp = 0; bp < 8; bp++ ) { if ( ptr[column*24 + bp*3] > 0 ) @@ -419,8 +416,6 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo // check only red as this is sufficient reverse = reverse | 128 >> bp; } - - bitmask <<= 1; } buf[column] = reverse;