Created attachment 123920 [details] Sample exported PNG image file (1200 W x 600 H) from Writer Writer fails to create the background image transparency of the "page no-fill" portion in an exported file. Attached is an exported sample file. Procedures and settings: "File -> Export" Example: * Format -> Page -> Area -> Fill -> None (Width: 12.00 " Height 6.00 ") * Properties of Inserted Image: White Background with Grey Border (blank_white_box_1024x512.png) * File -> Export -> lo_writer_image_export.png -> Save -> Resolution: 100 DPI -> OK Result: Area outside of Grey Border (Page Area) SHOULD BE TRANSPARENT. This is no longer the case beginning approximately with LibreOffice Writer Version 5.0.0.0. Worked properly in earlier releases.
Please could you attach test file? Thanks
A sample test output file has been attached when I initially posted this bug. Please see: "Created attachment 123920 [details] Sample exported PNG image file (1200 W x 600 H) from Writer" I'll attach the original .odt file from which the exported file was created if that's what you are asking for.
Created attachment 123954 [details] Sampt ODT File from which exported image originated
Note: In the attached ODT file in the current dev version of LibreOffice Writer (5.1.2.1) and in previous "working" versions prior to LibreOffice Writer 5.0.0.0, I have the following setting: * Format -> Page -> Transparency -> No Transparency This setting, in versions of LiberOffice Writer prior to 5.0.0.0, worked fine and resulted in a transparency outside of the grey borders of the imported image. It no longer works and there is no transparency in the exported image. I have tried using the "Transparency -> Transparency 100%" setting and this still does not work.
As Armin indicates in bug 96922 c#15, I don't believe bitmap export to PNG with alpha channel transparency has ever been implemented for Writer. Bitmap export from Writer to JPEG and PNG was implemented as a feature for the 4.1 release, prior to that export was only to HTML or PDF. Addition of transparency to frames in Writer was implemented at 4.2 and refined at 4.3. Frames of individual images, draw objects, paragraphs, and even the page canvas correctly retain their transparency as set for the frame--distinct from Area from 4.2 onward. But the Writer bitmap export has never supported a PNG alpha channel for the page, unlike the Draw export to PNG with alpha channel provides. I suppose it might be a reasonable enhancement. I see a use case for preparing alpha channel PNG using Writers better text and paragraph manipulation as more efficient than text boxes in Draw. Beleive we can resolve this invalid, or morph it to an enhancement. @Armin?
Agreed, enhancement would be good. Also please take a 2nd look at using 'Selection' in the dialog. It should limit export to the selected parts. In Writer and formal functionality that will probably create new writer pages (temporaily), add the selected stuff and export. It might re-layout (only one paragraph selected...?) which might need to be discussed. It will not use transparency due to Writer always painting the Page as BG. This is also discussable, even when Writer stuff is selected (text, ...). In that context it would also be handy to discuss if 'convert to Graphic...' like in Draw/Impress in the context menu of slections would be nice - it comes in handy sometimes and of course is even more useful when keeping the transparency. Just some thoughts...
*** Bug 117939 has been marked as a duplicate of this bug. ***
*** Bug 115508 has been marked as a duplicate of this bug. ***
*** Bug 161620 has been marked as a duplicate of this bug. ***
I reproduce comment 0: testing with attachment 123954 [details] ODT, File > Export > PNG ("save transparency" ticked), the result is a solid background. Same if setting page background to: A. none fill + no transparency B. none fill + full transparency C. none fill + partial (80%) transparency D. solid fill + full transparency E. solid fill + partial (80%) transparency Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 6f4adc1274cfac30b9097411bb193bd4386969f0 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Indeed, this is inconsistent with Draw's PNG export. Same happens with Calc for case A. However, Calc's page style does not support transparency, so I'm unsure if anything should be done there. Better keep this Writer-specific. Regarding the claim that case A is a 5.0 regression: I checked with the linux-64-releases bibisect repository and found that libreoffice-5.0.3.2 was the first version affected. In LO 5.0.3.1, it would result in what Eugene expects. No bibisect repo to check more precisely, but `git log libreoffice-5.0.3.1..libreoffice-5.0.3.2` shows the obvious cause: commit a093c5cac3a7b5ecdddf10720f4543ddf82b9163 Author: Tomaž Vajngerl Date: Mon Oct 19 14:04:21 2015 +0200 Writer image export: cmd. line, default to white background This commit fixes the writer image export (jpeg, png) that didn't work because the export pixel size was set to 0 by default. Now the default is set to document size (which depends on system DPI). When exporting to a PNG the background was transparent, which may not be desired. The background color is now by default white and can be changed for DocumentToGraphicRenderer, but the dialog or command line don't support such an option - for now. Reviewed-on: https://gerrit.libreoffice.org/19479 It could be debated if case A should result in a transparent background (even though that's what happens in Draw), but to me, this is obviously a bug for the cases that do use a non-0 transparency value for the page background (an issue that predates Quikee's commit). Quikee, what's you opinion on the issue now?
(In reply to Stéphane Guillou (stragu) from comment #10) > The background color is now by default white and > can be changed for DocumentToGraphicRenderer, but the dialog or > command line don't support such an option - for now. This is obviously the issue here: the dialog needs a control to choose the background color - either a simple checkbox [ ]transparent, or a full-scale color selector.