summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-09 15:24:19 +0200
committerAndras Timar <andras.timar@collabora.com>2021-06-14 08:08:29 +0200
commit52962085f2466ad0024c416f34c5d8bd61bcc844 (patch)
tree92c4b711c6d354171d65015f2fbc6d6cc59d76c7 /include/vcl
parent6b6197c6bec49fb0a4518ed7a0ed6b7e3f27fdea (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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116941
Diffstat (limited to 'include/vcl')
-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 7fac44a166af..710559d11d48 100644
--- a/include/vcl/RawBitmap.hxx
+++ b/include/vcl/RawBitmap.hxx
@@ -49,6 +49,12 @@ public:
if (mnBitCount == 32)
mpData[p] = nColor.GetTransparency();
}
+ 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;