]> git.saurik.com Git - wxWidgets.git/commitdiff
fix gcc warnings about float/double to int conversion after the latest changes
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 9 Sep 2007 19:34:01 +0000 (19:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 9 Sep 2007 19:34:01 +0000 (19:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/imagbmp.cpp
src/common/imagtiff.cpp

index 76d453272589a2cd4dc18fb9ff0b000ac18a0fe0..ff95ab1374f59983ec82e7f99fd179eb37d6c5bf 100644 (file)
@@ -200,8 +200,8 @@ bool wxBMPHandler::SaveDib(wxImage *image,
 
         case wxIMAGE_RESOLUTION_INCHES:
             // convert resolution in inches to resolution in centimeters
-            hres *= 100*mm2inches;
-            vres *= 100*mm2inches;
+            hres = (wxUint32)(100*mm2inches*hres);
+            vres = (wxUint32)(100*mm2inches*vres);
             // fall through to convert it to resolution in meters
 
         case wxIMAGE_RESOLUTION_CM:
index 49c76fba7c5b59dec3eae2ddd760f570b89724af..c956f6e2d1292a22d6a7217e48d465a7ba795a74 100644 (file)
@@ -373,10 +373,10 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
         {
             float xres, yres;
             if ( TIFFGetField(tif, TIFFTAG_XRESOLUTION, &xres) )
-                image->SetOption(wxIMAGE_OPTION_RESOLUTIONX, xres);
+                image->SetOption(wxIMAGE_OPTION_RESOLUTIONX, wxRound(xres));
 
             if ( TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres) )
-                image->SetOption(wxIMAGE_OPTION_RESOLUTIONY, yres);
+                image->SetOption(wxIMAGE_OPTION_RESOLUTIONY, wxRound(yres));
         }
     }