From e5b23d924d60e7a0fb67c44c6dad3f4cb3bd5ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 8 Feb 2017 13:33:02 +0000 Subject: [PATCH] clarify we're not setting a pal index in the mask no logic changed intended, SetPixelIndex expands to this, just want to clarify that this is an alpha value, not an index into a palette Change-Id: Ie9bb188b116adf3eab4e2bb1d6da8badbaead88b --- vcl/source/gdi/pngread.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index c0a0007f7466..055456a30352 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -1628,7 +1628,7 @@ void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX, nX >>= mnPreviewShift; mxAcc->SetPixelIndex( nY, nX, nPalIndex ); - mpMaskAcc->SetPixelIndex( nY, nX, ~nAlpha ); + mpMaskAcc->SetPixel(nY, nX, BitmapColor(~nAlpha)); } void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX, @@ -1642,7 +1642,7 @@ void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX, mxAcc->SetPixel( nY, nX, rBitmapColor ); if (!mpMaskAcc) return; - mpMaskAcc->SetPixelIndex( nY, nX, ~nAlpha ); + mpMaskAcc->SetPixel(nY, nX, BitmapColor(~nAlpha)); } sal_uInt32 PNGReaderImpl::ImplReadsal_uInt32()