summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-03-13 17:23:42 +0100
committerXisco Faulí <xiscofauli@libreoffice.org>2019-03-28 14:49:41 +0100
commite051b74e274c78d91ce69b37d896861816f5b6ea (patch)
tree331f52b4c31320c25b592670e04903a72c5da5ac
parentcdef6e5f4053adf5413781a9282285eab3923373 (diff)
fix transparency handling in BitmapEx::GetPixelColor()
Apparently the Color class uses transparency as the opposite of the normally used meaning of opacity, so transparency 255 means transparent. Change-Id: I3a76c2c93d98ad3c850017d3fd569b04dc6c19c8 Reviewed-on: https://gerrit.libreoffice.org/69211 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/69884 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index c81b8b0fd446..5642beba0c4d 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -762,7 +762,7 @@ Color BitmapEx::GetPixelColor(sal_Int32 nX, sal_Int32 nY) const
aColor.SetTransparency( pAlphaReadAccess->GetPixel( nY, nX ).GetIndex() );
}
else
- aColor.SetTransparency(255);
+ aColor.SetTransparency(0);
return aColor;
}