mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-22 06:22:58 +02:00
(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:
@@ -757,12 +757,14 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if 0
|
||||||
// Deliberate policy to use the fast/cheap blocky pixel-multiplication
|
// Deliberate policy to use the fast/cheap blocky pixel-multiplication
|
||||||
// algorithm, as this introduces no artifacts on repeated scale up/down.
|
// algorithm, as this introduces no artifacts on repeated scale up/down.
|
||||||
ImageCache.Rescale(
|
ImageCache.Rescale(
|
||||||
ImageCache.GetWidth() * 4,
|
ImageCache.GetWidth()*4,
|
||||||
ImageCache.GetHeight() *4,
|
ImageCache.GetHeight()*4,
|
||||||
wxIMAGE_QUALITY_NEAREST );
|
wxIMAGE_QUALITY_NEAREST );
|
||||||
|
#endif
|
||||||
if( !ImageCache.SaveFile( FileName, wxBITMAP_TYPE_PNG ))
|
if( !ImageCache.SaveFile( FileName, wxBITMAP_TYPE_PNG ))
|
||||||
{
|
{
|
||||||
wxMessageBox(
|
wxMessageBox(
|
||||||
|
Reference in New Issue
Block a user