X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7beb59f36c016d27cf8949eb8c0d38fc63ad536a..f68ca36e0d9c7c2549a10ab612aef2e92e7f8be9:/src/common/imagjpeg.cpp diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index 0f3e5756fa..d7cd54a73c 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -363,7 +363,7 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo if (image->HasOption(wxIMAGE_OPTION_RESOLUTION)) { cinfo.X_density = - cinfo.Y_density = image->GetOptionInt(wxIMAGE_OPTION_RESOLUTION); + cinfo.Y_density = (UINT16)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTION); } // sets the resolution unit field in the output file @@ -371,7 +371,7 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo // wxIMAGE_RESOLUTION_CM for centimeters if (image->HasOption(wxIMAGE_OPTION_RESOLUTIONUNIT)) { - cinfo.density_unit = image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONUNIT); + cinfo.density_unit = (UINT8)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONUNIT); } jpeg_start_compress(&cinfo, TRUE);