X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0d81b3cd93ae360405b3b98f92b6e43cbf4f23c1..e408bf5257ead0754de5ef37a39867c7536dbe03:/src/common/imagbmp.cpp diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 83a22d91ea..72398fcda1 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -180,9 +180,8 @@ bool wxBMPHandler::SaveDib(wxImage *image, // get the resolution from the image options or fall back to 72dpi standard // for the BMP format if not specified - wxUint32 hres = image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONX), - vres = image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONY); - switch ( image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONUNIT) ) + int hres, vres; + switch ( GetResolutionFromOptions(*image, &hres, &vres) ) { default: wxFAIL_MSG( _T("unexpected image resolution units") ); @@ -195,8 +194,8 @@ bool wxBMPHandler::SaveDib(wxImage *image, case wxIMAGE_RESOLUTION_INCHES: // convert resolution in inches to resolution in centimeters - hres = (wxUint32)(10*mm2inches*hres); - vres = (wxUint32)(10*mm2inches*vres); + hres = (int)(10*mm2inches*hres); + vres = (int)(10*mm2inches*vres); // fall through to convert it to resolution in meters case wxIMAGE_RESOLUTION_CM: