Bug 126876 - Redaction: allow transparent PNG images
Summary: Redaction: allow transparent PNG images
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Redaction
  Show dependency treegraph
 
Reported: 2019-08-13 11:27 UTC by Thomas Lendo
Modified: 2024-06-18 02:14 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
zip archive with test files (334.32 KB, application/x-zip-compressed)
2019-08-14 07:40 UTC, Thomas Lendo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lendo 2019-08-13 11:27:57 UTC
In with Redaction feature exported pdf files, png images with an alpha channel ('transparent png') are saved without alpha channel and the transparent areas of the images are shown black.
Comment 1 Jean-Baptiste Faure 2019-08-13 20:53:31 UTC
Please, could you attach a test file ?

Status set to NEEDINFO; please set it back to UNCONFIRMED once the requested information is provided.

Best regards. JBF
Comment 2 Thomas Lendo 2019-08-14 07:40:30 UTC
Created attachment 153373 [details]
zip archive with test files

In the attached zip archive I've added sample files:
- original Writer document with text and an png image with alpha channel
- normal pdf export (for reference)
- Draw file with redaction notation at the text
- redaction pdf export

Actual Result:
The png image has black areas where it should be transparent in the redaction pdf export file.

Expected Result:
Same alpha channel image rendering as in normal pdf export (except less resolution quality).
Comment 3 Heiko Tietze 2020-01-21 14:20:54 UTC
Don't see need for input from UX (would be surprising if transparency is allowed only internally and this behavior is by design).
Comment 4 Muhammet Kara 2020-01-23 12:50:37 UTC
This behavior is not by design, but a result of some technical limitations in the implementation. It can be improved, but beware that it is not a trivial task.

Notes for the interested devs: at some point of its journey, the GDIMetaFile of a redacted page goes through a roundtrip to and back from WMF which causes the reported issue. To fix it, one needs to first fix the rendered GDIMetaFile, and remove the then needed roundtrip code. Related patch is here: https://gerrit.libreoffice.org/c/core/+/74223

(For the QA people: Although this issue starts with a particular commit, it is not a regression. The feature was still in-development, and in an interim state at that time.)