[Libreoffice-commits] core.git: Branch 'feature/nativealpha' - vcl/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Tue Jun 28 08:42:40 UTC 2016
vcl/source/bitmap/BitmapProcessor.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 06fbf1c42be1e58abe9e705f72e0716e4d20c192
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Tue Jun 28 16:39:57 2016 +0800
BitmapProcessor: support 32-bit bitmap in createLightImage
Change-Id: If28c715f9737f34b9d71c1342cae88fcc69231dd
diff --git a/vcl/source/bitmap/BitmapProcessor.cxx b/vcl/source/bitmap/BitmapProcessor.cxx
index ea32705..0b27a05 100644
--- a/vcl/source/bitmap/BitmapProcessor.cxx
+++ b/vcl/source/bitmap/BitmapProcessor.cxx
@@ -17,7 +17,9 @@ BitmapEx BitmapProcessor::createLightImage(const BitmapEx& rBitmapEx)
const Size aSize(rBitmapEx.GetSizePixel());
Bitmap aBitmap(rBitmapEx.GetBitmap());
- Bitmap aDarkBitmap(aSize, 24);
+ int nBitcount = aBitmap.GetBitCount() == 32 ? 32 : 24;
+
+ Bitmap aDarkBitmap(aSize, nBitcount);
BitmapReadAccess* pRead(aBitmap.AcquireReadAccess());
BitmapWriteAccess* pWrite(aDarkBitmap.AcquireWriteAccess());
More information about the Libreoffice-commits
mailing list