diff --git a/include/wx/image.h b/include/wx/image.h index 4ca8379f80..575b96b362 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -71,7 +71,7 @@ enum wxImageResizeQuality wxIMAGE_QUALITY_NORMAL = wxIMAGE_QUALITY_NEAREST, // highest (but best) quality - wxIMAGE_QUALITY_HIGH + wxIMAGE_QUALITY_HIGH = 4 }; // alpha channel values: fully transparent, default threshold separating diff --git a/src/common/image.cpp b/src/common/image.cpp index 66caa08174..5131342a36 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -443,13 +443,6 @@ wxImage::Scale( int width, int height, wxImageResizeQuality quality ) const if ( old_width == width && old_height == height ) return *this; - if (quality == wxIMAGE_QUALITY_HIGH) - { - quality = (width < old_width && height < old_height) - ? wxIMAGE_QUALITY_BOX_AVERAGE - : wxIMAGE_QUALITY_BICUBIC; - } - // Resample the image using the method as specified. switch ( quality ) { @@ -474,6 +467,12 @@ wxImage::Scale( int width, int height, wxImageResizeQuality quality ) const case wxIMAGE_QUALITY_BOX_AVERAGE: image = ResampleBox(width, height); break; + + case wxIMAGE_QUALITY_HIGH: + image = width < old_width && height < old_height + ? ResampleBox(width, height) + : ResampleBicubic(width, height); + break; } // If the original image has a mask, apply the mask to the new image