(Hi-DPI) No longer upscale ImageCache
I found a couple of problems working with upscaled image caches. Firstly in GIMP a 'size 4 square pencil' is not 4x4, which makes editing an upscaled image very fiddly. Secondly the wxIMAGE_QUALITY_NEAREST algorithm is not as dumb as I need it to be, and it is doing some blending when rescaling. This leads to loss of image quality in some cases. So when we do switch to Hi-DPI support, we need to be 'all in' and only be downscaling in Audacity, not upscaling too.
This commit is contained in:
parent
5a26afd7fd
commit
62f75eb159
|
@ -757,12 +757,14 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
// Deliberate policy to use the fast/cheap blocky pixel-multiplication
|
||||
// algorithm, as this introduces no artifacts on repeated scale up/down.
|
||||
ImageCache.Rescale(
|
||||
ImageCache.GetWidth() * 4,
|
||||
ImageCache.GetHeight() *4,
|
||||
ImageCache.GetWidth()*4,
|
||||
ImageCache.GetHeight()*4,
|
||||
wxIMAGE_QUALITY_NEAREST );
|
||||
#endif
|
||||
if( !ImageCache.SaveFile( FileName, wxBITMAP_TYPE_PNG ))
|
||||
{
|
||||
wxMessageBox(
|
||||
|
|
Loading…
Reference in New Issue