Steps to reproduce: 1. Open attachment 83367 [details] from bug 67582 2. Export to PDF -> Images in page 1 and page 4 are not exported Reproduced in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 0c4913e03e8427a576138601958f2dbf13b8c37b CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded [Bug found by office-interoperability-tools]
Regression introduced by: author Patrick Luby <plubius@neooffice.org> 2023-08-07 12:17:36 -0400 committer Patrick Luby <plubius@neooffice.org> 2023-08-10 14:01:10 +0200 commit 12fd870113a663dde5ceb38c61f1986a34095d0e (patch) tree 04982fbf6a4ed1de1fda1346e73385b375e76e52 parent 0d8a5f89bff51480d721395729a67e7b4260aea5 (diff) tdf#156630 eliminate opaque parts when drawing animated PNG images Bisected with: bibisect-linux64-24.2 Adding Cc: to Patrick Luby
Found the line of code that causes this bug. Problem is that removing the Invert() causes the image on page 3 to be rendered incorrectly in the exported PDF. So, the question is what is unique about the animated PNGs. diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 37583d0b01d1..3b069bdf6bfd 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -811,7 +811,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa if ( aBitmapEx.IsAlpha()) { AlphaMask aAlpha = aBitmapEx.GetAlphaMask(); - aAlpha.Invert(); + // aAlpha.Invert(); aBitmapEx = BitmapEx(aBitmapEx.GetBitmap(), aAlpha); }
Patrick Luby committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b2ca39bc5e424e67e8fc7e8a044214feb09e39f7 tdf#157576 and tdf#157635 mask out black pixels It will be available in 24.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 190072 [details] Strange rendering of animated image with Skia disabled on macOS
I have committed a fix for the missing animated images when exporting to PDF. It should be included in tomorrow's (07 October 2023) nightly master build. Note: while debugging, I found that when viewing the document with Skia disabled on macOS, the animated images periodically includes a snapshot of the window's status bar: https://bugs.documentfoundation.org/attachment.cgi?id=190072 This new bug doesn't occur with Skia/Metal or Skia/Raster but it does occur as far back as LibreOffice 7.5.7 so this is an old bug. Does anyone see this same new bug when running on Windows or Linux with Skia disabled?
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4e1aec7937c0ccd9aa3c5c34091e94786f16e145 tdf#49253, tdf#157635, tdf#157576: sd_png_export: Add unittest It will be available in 24.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.