- case wxIMAGE_QUALITY_BICUBIC:
- case wxIMAGE_QUALITY_BILINEAR:
- // both of these algorithms should be used for up-sampling the
- // image only, when down-sampling always use box averaging for best
- // results
- if ( width < old_width && height < old_height )
- image = ResampleBox(width, height);
- else if ( quality == wxIMAGE_QUALITY_BILINEAR )
- image = ResampleBilinear(width, height);
- else if ( quality == wxIMAGE_QUALITY_BICUBIC )
- image = ResampleBicubic(width, height);
- break;
+ quality = (width < old_width && height < old_height)
+ ? wxIMAGE_QUALITY_BOX_AVERAGE
+ : wxIMAGE_QUALITY_BICUBIC;
+ }