In previous versions of LibreOffice, XBitmap.getMaskDIB() returned a transparency mask (0 = opaque, 255 = transparent). In 24.2, it now returns an opacity mask (0 = transparent, 255 = opaque), the reverse of what existing programs expect.
Just to allow QA people to test this quickly, could you provide a complete example? (eg: a file containing an image with transparency + macro)
Created attachment 197008 [details] Document with a partially transparent image embedded
Created attachment 197009 [details] Program using XBitmap API to extract transparency mask of image run: /path/to/libreoffice7.6/program/soffice --headless --accept='socket,host=localhost,port=8000,tcpNoDelay=1;urp' run: java -cp /path/to/libreoffice7.6/program/classes/\* ExtractMask.java view logo-maskdib.bmp, see opaque areas are in black run: /path/to/libreoffice24.2/program/soffice --headless --accept='socket,host=localhost,port=8000,tcpNoDelay=1;urp' run: java -cp /path/to/libreoffice24.2/program/classes/\* ExtractMask.java view logo-maskdib.bmp, see opaque areas are in white
[Automated Action] NeedInfo-To-Unconfirmed
Created attachment 197016 [details] bitmap extracted On pc Debian x86-64 with master sources updated today or with LO Debian package 24.8.2.1, I got opaque areas in black (see attachment). On which env are you? Would it be possible you give a try to 24.8 version?
I'm using Ubuntu 22.04 x86-64. That image from 24.8 is the same as what I get with 24.2: the opaque logo/text are represented with white, the transparent background with black. But this is the opposite of 7.6 and all earlier versions, where the opaque content is black and the transparent background is white.
Noel: could it be related to the rework about transparency/alpha ?
Noel Grandin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/bb6db3aa4c86b92e8321d6734bcb34ba28dfeb27 tdf#163381 XBitmap.getMaskDIB() is inverted It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 197090 [details] new extraction Here's the new extraction with master sources updated today.
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/1ebee6c662413d4d0c0218cd12435f4a39fc9582 tdf#163381 XBitmap.getMaskDIB() is inverted It will be available in 24.8.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/50c07bc4fc602887b48c36db82328e97b0395ff3 tdf#163381 XBitmap.getMaskDIB() is inverted It will be available in 24.2.8. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-24-2-7": https://git.libreoffice.org/core/commit/654869813b7014830ee4d0ea345655c3d6086c65 tdf#163381 XBitmap.getMaskDIB() is inverted It will be available in 24.2.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.