diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-29 09:39:17 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-30 13:25:00 +0100 |
commit | b0c475a00ced9ec1e4ef1efb9d184ee8e2a3eaab (patch) | |
tree | 52e70ba35d08a8688a473650d1fbc65bdb1ee212 /vcl/source/image/ImplImageTree.cxx | |
parent | ccc53c51f35e38750b26768dd54fc311a696afba (diff) |
tdf#119020 always scale icons as 24bit RGB
We don't really care for the palette or even lower bitness of the
original icons, when scaling them. So just convert them to 24bit
to get the best scaling quality.
And also actually fail the OpenGL scaling for 8bit color icons,
instead of handling them as a grayscale image, which results in
"funny" luminance based color icons.
Change-Id: I62ff9e7cd45dbffba81b0db5a0252737b6189059
Reviewed-on: https://gerrit.libreoffice.org/62505
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/source/image/ImplImageTree.cxx')
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index af5329ec379e..1fed00908365 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -182,6 +182,8 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & xStream, OUString con { rParameters.mbWriteImageToCache = true; // Cache the scaled variant double aScaleFactor(aScalePercentage / 100.0); + // when scaling use the full 24bit RGB values + rParameters.mrBitmap.Convert(BmpConversion::N24Bit); rParameters.mrBitmap.Scale(aScaleFactor, aScaleFactor, BmpScaleFlag::Fast); } } |