vcl/source/graphic/UnoGraphic.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit bb6db3aa4c86b92e8321d6734bcb34ba28dfeb27 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Oct 16 10:25:28 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Oct 16 16:57:30 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 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