diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-16 10:25:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-16 16:57:30 +0200 |
commit | bb6db3aa4c86b92e8321d6734bcb34ba28dfeb27 (patch) | |
tree | 760613a65d88194ac077e8a983174ec0cac603a1 /vcl/source/graphic | |
parent | 8e2369a7813ba7dca75ac30b5ae2a26e181503c6 (diff) |
tdf#163381 XBitmap.getMaskDIB() is inverted
regression from the transparency->alpha work
Change-Id: I2aaf8262191ca6136f87c59629e95bd9a7e7e419
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174991
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'vcl/source/graphic')
-rw-r--r-- | vcl/source/graphic/UnoGraphic.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index 2f360c8b40b7..484d04443f72 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -165,7 +165,10 @@ uno::Sequence<sal_Int8> SAL_CALL Graphic::getMaskDIB() { SvMemoryStream aMemoryStream; - WriteDIB(maGraphic.GetBitmapEx().GetAlphaMask().GetBitmap(), aMemoryStream, false, true); + AlphaMask aMask = maGraphic.GetBitmapEx().GetAlphaMask(); + // for backwards compatibility for extensions, we need to convert from alpha to transparency + aMask.Invert(); + WriteDIB(aMask.GetBitmap(), aMemoryStream, false, true); return css::uno::Sequence<sal_Int8>( static_cast<sal_Int8 const *>(aMemoryStream.GetData()), aMemoryStream.Tell() ); } else |