vcl/source/graphic/UnoGraphic.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 654869813b7014830ee4d0ea345655c3d6086c65 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Oct 16 10:25:28 2024 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Oct 22 11:14:59 2024 +0200 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.gran...@collabora.co.uk> Tested-by: Jenkins (cherry picked from commit bb6db3aa4c86b92e8321d6734bcb34ba28dfeb27) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174958 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 50c07bc4fc602887b48c36db82328e97b0395ff3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174960 Tested-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index 9036f54452ba..3ea6f107fde1 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