Download it now!
Bug 128992 - Compressing PNG files with alpha channel get a black background
Summary: Compressing PNG files with alpha channel get a black background
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0 target:6.4.0.1 target:6.3.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-11-24 10:31 UTC by Franz Berg
Modified: 2019-12-06 12:30 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
png file to reproduce (225.82 KB, image/png)
2019-11-24 10:31 UTC, Franz Berg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Berg 2019-11-24 10:31:37 UTC
Created attachment 156072 [details]
png file to reproduce

Compressing PNG files with alpha channel get a black background.

Steps to reproduce :
- insert a png file with alpha channel (see example in attachement) into libreoffice writer (either using the insert menu or drag and drop)
- right-click "compress"
- in the compress dialog box use JPEG compression, then click OK
- image gets compressed with black background

Used to work properly (i.e. get a white background) with previous libreoffice versions
Same issue with Draw
Comment 1 Julien Nabet 2019-11-24 13:12:13 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I noticed these logs on console when inserting the image:
warn:vcl.gdi:67661:67661:vcl/headless/svpgdi.cxx:130: unsupported SvpSalGraphics::blendAlphaBitmap case
warn:vcl.gdi:67661:67661:vcl/headless/svpgdi.cxx:130: unsupported SvpSalGraphics::blendAlphaBitmap case
Comment 2 Xisco Faulí 2019-11-25 13:12:55 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=d4442ac1ac9aae36dbc08fda8154d71ea0f81708

author	Noel Grandin <noel.grandin@collabora.co.uk>	2018-05-30 13:02:25 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2018-05-31 14:08:44 +0200
commit	d4442ac1ac9aae36dbc08fda8154d71ea0f81708 (patch)
tree	62fdc7419391dbf8c1cd92872ba2c9e12df2c4b6
parent	b7939ff897a173086643819451c7b2b4553c11c3 (diff)
drop Graphic::GetBitmap

Bisected with: bibisect-linux64-6.2 

Adding Cc: to Noel Grandin
Comment 3 Commit Notification 2019-12-04 16:24:15 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1187e2b35bb864808d9d158f0b10d83ce75dbaa7

tdf#128992 Compressing PNG files with alpha channel get a black background

It will be available in 6.5.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.
Comment 4 Commit Notification 2019-12-04 18:46:15 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/54a4c75bd35ba684927862f4e859623e91ebcfe8

tdf#128992 Compressing PNG files with alpha channel get a black background

It will be available in 6.4.0.1.

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.
Comment 5 Xisco Faulí 2019-12-05 10:19:16 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: 304368c7be2c9e408cc3884183e39d90a4b15da7
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Noel, thanks for fixing this issue!
Comment 6 Commit Notification 2019-12-06 12:30:06 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/61e8387fa8ab55a04b95839c7c385c163d6de1cd

tdf#128992 Compressing PNG files with alpha channel get a black background

It will be available in 6.3.5.

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.