diff options
-rw-r--r-- | vcl/opengl/salbmp.cxx | 2 | ||||
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 8a07f5ceb4a5..67b49e1ce185 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -581,7 +581,7 @@ bool OpenGLSalBitmap::ReadTexture() xContext->state().scissor().disable(); xContext->state().stencil().disable(); - if (mnBits == 8 || mnBits == 16 || mnBits == 24 || mnBits == 32) + if ((mnBits == 8 && maPalette.IsGreyPalette()) || mnBits == 16 || mnBits == 24 || mnBits == 32) { determineTextureFormat(mnBits, nFormat, nType); 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); } } |