Created attachment 157333 [details] 6.5 vs 6.4 Steps to reproduce: 1. Open LibreOffice 2. Help - about LibreOfice Reproduced in Version: 6.5.0.0.alpha0+ Build ID: a821d89646ef25428cf5992f86d8f31581313bdb CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=86d44930eecb5e8933f6870684adbb5f9200d6f7 author Luboš Luňák <l.lunak@collabora.com> 2019-12-20 19:40:00 +0100 committer Luboš Luňák <l.lunak@collabora.com> 2020-01-21 11:25:19 +0100 commit 86d44930eecb5e8933f6870684adbb5f9200d6f7 (patch) tree 617a89cd8aea0019d13883a5e2970c33ce86aaec parent e7b8ed940ecc5397212ae25f48e58618fa8ac6fd (diff) avoid needless 32bpp->24+8bpp conversion in png writer Bisected with: bibisect-linux64-6.5 Adding Cc: to Luboš Luňák
I cannot reproduce. I've built 6b4fe3e44b4daa89fef6a3385919b00472eaed60 and if I run 'SAL_USE_VCLPLUGIN=gtk3 soffice', I get always the same result with or without the patch reverted. And the patch is about writing .png files, so I don't see how it should affect anything loaded by LO. Are you sure it's really my commit?
In vcl/unx/gtk3/gtk3gtkinst.cxx the logo of the About Box is set via set_logo and the input css::graphic::XGraphic is serialized to a png with... getPixbuf(const css::uno::Reference<css::graphic::XGraphic>& rImage) Image aImage(rImage); vcl::PNGWriter aWriter(aImage.GetBitmapEx()... to a GdkPixbuf so we can feed it to gtk_about_dialog_set_logo I can confirm it appears to begin happening at the mentioned commit
a debugging patch of... diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index c4b58aaebc67..0b963d43bd10 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3112,6 +3112,9 @@ namespace vcl::PNGWriter aWriter(aImage.GetBitmapEx(), &aFilterData); aWriter.Write(*xMemStm); + SvFileStream aStream("/tmp/dumpme.png", StreamMode::STD_READWRITE | StreamMode::TRUNC); + aWriter.Write(aStream); + return load_icon_from_stream(*xMemStm, "png"); } gives... a png with a white bg after the change and a transparent one before the change
Created attachment 157404 [details] transparent bg
Created attachment 157405 [details] white bg after change
The alpha handling in LO is such a mess :(. I'll just revert the patch and leave patching up all the places breaking true 32bpp bitmaps to whoever would feel bored enough to spend the effort on it.
Luboš Luňák committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9bc731524b3c5cc809ca4573daa316173a5ec13a Revert "avoid needless 32bpp->24+8bpp conversion in png writer" (tdf#130128) 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.
Verified in Version: 7.0.0.0.alpha0+ Build ID: aef7feb3e695ecf6d411f0777196dcc4281e201a CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded