vcl/source/bitmap/BitmapProcessor.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 06fbf1c42be1e58abe9e705f72e0716e4d20c192
Author: Tomaž Vajngerl <tomaz.vajng...@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());
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to