summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-09 15:24:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-09 18:25:10 +0200
commit520bb32555985c12642b40fad3b7dcac7a940585 (patch)
tree9a48efb494135b429e63b1bcbe5d2c916daba70a /include
parente6aecfeea18a5b98ec724e6229295170ec75c936 (diff)
tdf#142629 import psd image with transparent background
regression from commit 2168d709805a847ac012ff87b06e081ca139d064 Date: Mon Feb 12 15:29:10 2018 +0200 use RawBitmap in PSDReader Change-Id: I8d547d3cca7fb8fc90a8d9382e054b4d4b2f3519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/RawBitmap.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/vcl/RawBitmap.hxx b/include/vcl/RawBitmap.hxx
index 26e08dbdedac..b26d532a4032 100644
--- a/include/vcl/RawBitmap.hxx
+++ b/include/vcl/RawBitmap.hxx
@@ -49,6 +49,12 @@ public:
if (mnBitCount == 32)
mpData[p] = nColor.GetAlpha();
}
+ void SetAlpha(tools::Long nY, tools::Long nX, sal_uInt8 nAlpha)
+ {
+ assert(mnBitCount == 32);
+ tools::Long p = (nY * maSize.getWidth() + nX) * (mnBitCount / 8) + 3;
+ mpData[p] = nAlpha;
+ }
Color GetPixel(tools::Long nY, tools::Long nX) const
{
tools::Long p = (nY * maSize.getWidth() + nX) * mnBitCount / 8;