Bug 98954 - EXPORT to PNG: Background Transparency is Lost
Summary: EXPORT to PNG: Background Transparency is Lost
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.0.0.0.alpha0+ Master
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 115508 117939 (view as bug list)
Depends on:
Blocks: Writer-Enhancements Graphics-Export
  Show dependency treegraph
 
Reported: 2016-03-29 12:45 UTC by Eugene Markow
Modified: 2020-09-25 15:47 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample exported PNG image file (1200 W x 600 H) from Writer (71.67 KB, image/png)
2016-03-29 12:45 UTC, Eugene Markow
Details
Sampt ODT File from which exported image originated (17.42 KB, application/vnd.oasis.opendocument.text)
2016-03-30 10:54 UTC, Eugene Markow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Markow 2016-03-29 12:45:11 UTC
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.
Comment 1 raal 2016-03-30 09:48:44 UTC
Please could you attach test file? Thanks
Comment 2 Eugene Markow 2016-03-30 10:26:46 UTC
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.
Comment 3 Eugene Markow 2016-03-30 10:54:57 UTC
Created attachment 123954 [details]
Sampt ODT File from which exported image originated
Comment 4 Eugene Markow 2016-03-30 11:02:37 UTC
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.
Comment 5 V Stuart Foote 2016-03-30 13:39:55 UTC
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?
Comment 6 Armin Le Grand 2016-04-01 08:24:43 UTC
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...
Comment 7 Xisco Faulí 2018-06-04 16:41:10 UTC
*** Bug 117939 has been marked as a duplicate of this bug. ***
Comment 8 V Stuart Foote 2020-09-25 14:43:48 UTC
*** Bug 115508 has been marked as a duplicate of this bug. ***