]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagtiff.cpp
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / src / common / imagtiff.cpp
index 71da4fdfb3c48e62dddc8265583fb60d060432a1..0e31879a4ebdaeeb5dbf3c32dd652891cc07fa02 100644 (file)
@@ -343,9 +343,9 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
             image->HasOption(wxIMAGE_OPTION_RESOLUTIONY) )
     {
         TIFFSetField(tif, TIFFTAG_XRESOLUTION,
             image->HasOption(wxIMAGE_OPTION_RESOLUTIONY) )
     {
         TIFFSetField(tif, TIFFTAG_XRESOLUTION,
-                        image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONX));
+                        (float)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONX));
         TIFFSetField(tif, TIFFTAG_YRESOLUTION,
         TIFFSetField(tif, TIFFTAG_YRESOLUTION,
-                        image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONY));
+                        (float)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONY));
     }
 
     int spp = image->GetOptionInt(wxIMAGE_OPTION_SAMPLESPERPIXEL);
     }
 
     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));
 
 
     TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,TIFFDefaultStripSize(tif, (uint32) -1));
 
-    uint8 bitmask;
-
     unsigned char *ptr = image->GetData();
     for ( int row = 0; row < image->GetHeight(); row++ )
     {
     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;
                 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 )
                     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;
                         }
                             // check only red as this is sufficient
                             reverse = reverse | 128 >> bp;
                         }
-
-                        bitmask <<= 1;
                     }
 
                     buf[column] = reverse;
                     }
 
                     buf[column] = reverse;