Small warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -365,13 +365,13 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
|
|||||||
if ( image->HasOption(wxIMAGE_OPTION_RESOLUTIONX) &&
|
if ( image->HasOption(wxIMAGE_OPTION_RESOLUTIONX) &&
|
||||||
image->HasOption(wxIMAGE_OPTION_RESOLUTIONY) )
|
image->HasOption(wxIMAGE_OPTION_RESOLUTIONY) )
|
||||||
{
|
{
|
||||||
resX = image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONX);
|
resX = (UINT16)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONX);
|
||||||
resY = image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONY);
|
resY = (UINT16)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTIONY);
|
||||||
}
|
}
|
||||||
else if ( image->HasOption(wxIMAGE_OPTION_RESOLUTION) )
|
else if ( image->HasOption(wxIMAGE_OPTION_RESOLUTION) )
|
||||||
{
|
{
|
||||||
resX =
|
resX =
|
||||||
resY = image->GetOptionInt(wxIMAGE_OPTION_RESOLUTION);
|
resY = (UINT16)image->GetOptionInt(wxIMAGE_OPTION_RESOLUTION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -738,9 +738,15 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
|
|||||||
int iHeight = image->GetHeight();
|
int iHeight = image->GetHeight();
|
||||||
int iWidth = image->GetWidth();
|
int iWidth = image->GetWidth();
|
||||||
|
|
||||||
unsigned char uchMaskRed = bHasMask ? image->GetMaskRed() : 0;
|
unsigned char uchMaskRed = 0, uchMaskGreen = 0, uchMaskBlue = 0;
|
||||||
unsigned char uchMaskGreen = bHasMask ? image->GetMaskGreen() : 0;
|
|
||||||
unsigned char uchMaskBlue = bHasMask ? image->GetMaskBlue() : 0;
|
if ( bHasMask )
|
||||||
|
{
|
||||||
|
uchMaskRed = image->GetMaskRed();
|
||||||
|
uchMaskGreen = image->GetMaskGreen();
|
||||||
|
uchMaskBlue = image->GetMaskBlue();
|
||||||
|
}
|
||||||
|
|
||||||
unsigned char *pColors = image->GetData();
|
unsigned char *pColors = image->GetData();
|
||||||
|
|
||||||
for (int y = 0; y != iHeight; ++y)
|
for (int y = 0; y != iHeight; ++y)
|
||||||
|
Reference in New Issue
Block a user