Download it now!
Bug 135912 - PNG export of text with graphical shadow applied does not output correctly
Summary: PNG export of text with graphical shadow applied does not output correctly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks:
 
Reported: 2020-08-19 10:00 UTC by mwtjunkmail
Modified: 2020-11-23 17:41 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Expected output (13.44 KB, image/png)
2020-08-19 10:02 UTC, mwtjunkmail
Details
Testing file (9.39 KB, application/vnd.oasis.opendocument.graphics)
2020-08-19 10:02 UTC, mwtjunkmail
Details
shadowed text exported as selection (15.93 KB, image/png)
2020-08-19 10:04 UTC, mwtjunkmail
Details
output of entire slide with shadowed text (26.08 KB, image/png)
2020-08-19 10:05 UTC, mwtjunkmail
Details
unshadowed text exported as selection (8.44 KB, image/png)
2020-08-19 10:07 UTC, mwtjunkmail
Details
unshadowed text exported as entire slide (15.88 KB, image/png)
2020-08-19 10:09 UTC, mwtjunkmail
Details
zip of test results using 2020.10.16 64-bit windows daily build (331.64 KB, application/x-zip-compressed)
2020-10-16 12:14 UTC, mwtjunkmail
Details
anti-aliasing still happening on shadowed text (70.01 KB, image/png)
2020-11-23 17:37 UTC, mwtjunkmail
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mwtjunkmail 2020-08-19 10:00:59 UTC
Description:
Applying a graphical shadow to a text object in LibreOffice draw creates odd output in PNG, effectively creating a cut-out effect of any object beneath the text as well as leaving borders behind when no borders are selected.

NOT having a graphical shadow applied to a copy of the same text object leaves borders behind.

The sample background box had borders on it when it was set not to have any.

Steps to Reproduce:
1. Launch LO Draw
2. Draw a shape (I chose a box, fill it black, and set its border property to None
3. type text over part of the box (see attachment).
4. Set the shadow property (not the text shadow property) of the text object to be black with a 1,1 offset.
5. Output the slide as PNG
5a. In its entirety
5b. as just a selection

6. Repeat 1-5b, but this time do not apply a shadow effect to the text object.

Actual Results:
Shadowed text creates a cutout of the object beneath it and leaves borders behind where no borders are defined, but does so differently depending whether the entire slide was exported or only a selection exported.

Unshadowed text does not cut out the object beneath it, but borders are present when no borders are defined.

Expected Results:
In the PNG output, no cutout should occur in objects beneath a shadowed text object, and no borders should appear in the output where no borders are defined.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 8; OS: Windows 10.0 Build 20190; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

BuildVersion=<buildversion>
buildid=82189fdc93ac337e1de3379d678eca6b7654e6fc
ExtensionUpdateURL=http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update
MsiProductVersion=7.1.0.0.alpha0
ProductCode={B9BAD41C-55C4-4886-9539-48BB387F388E}
ReferenceOOoMajorMinor=4.1
UpdateChannel=
UpdateID=LibreOfficeDev_7
Comment 1 mwtjunkmail 2020-08-19 10:02:29 UTC
Created attachment 164455 [details]
Expected output

Expected output.
Comment 2 mwtjunkmail 2020-08-19 10:02:51 UTC
Created attachment 164456 [details]
Testing file

Testing file
Comment 3 mwtjunkmail 2020-08-19 10:04:21 UTC
Created attachment 164457 [details]
shadowed text exported as selection

PNG output of slide contained a shadowed text objects with "selection" checked on the export dialog.
Comment 4 mwtjunkmail 2020-08-19 10:05:01 UTC
Created attachment 164458 [details]
output of entire slide with shadowed text

PNG output of entire slide contained a shadowed text objects (with "selection" NOT checked on the export dialog.)
Comment 5 mwtjunkmail 2020-08-19 10:07:30 UTC
Created attachment 164459 [details]
unshadowed text exported as selection

PNG output of slide contained NO shadowed text objects with "selection" checked on the export dialog. 

The cut-out effect does not appear when the text object does not have a graphical shadow applied to it, but borders appear where no border is defined, and the text is apparently anti-aliased in a white fringe.
Comment 6 mwtjunkmail 2020-08-19 10:09:39 UTC
Created attachment 164460 [details]
unshadowed text exported as entire slide

PNG output of an entire slide contained NO shadowed text objects (with "selection" NOT checked on the export dialog).

Similar results as the selection output, including the border around the shape object where no border is defined.
Comment 7 Telesto 2020-08-19 10:25:10 UTC
Repro with master
Comment 8 Telesto 2020-08-19 10:27:26 UTC
The image quality simply horrific (but off topic) with 6.4 or 7.1 but export looks normal with 6.4 (if export the selection, I get transparent area where at the position of the textbox (not in 6.4)
Comment 9 Telesto 2020-08-19 10:28:25 UTC
Follow up/spin off of bug 134213
Comment 10 Telesto 2020-08-19 10:32:34 UTC
Not in
Version: 7.0.0.0.beta1+ (x64)
Build ID: 2891e91a513520d68ea2b8c59c14335861a15253
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 11 mwtjunkmail 2020-10-16 12:14:16 UTC
Created attachment 166415 [details]
zip of test results using 2020.10.16 64-bit windows daily build

Still happening in Windows version (using Skia and AA).

Version: 7.1.0.0.alpha0+ (x64)
Build ID: df74aef7159d7155addf78cfc4d139485945d794
CPU threads: 8; OS: Windows 10.0 Build 20236; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded


In the zip, the draw file renders on the screen as expected (continuing to pretend, of course, that the white background on the slide with no background isn't really white but transparent as we've set it to be but that's a different issue).

The two PNG output files should look exactly like their respective slides in the draw file. You can see on the lower text sample on the black background slide that the text is rendered to white (faint white outlines where there should be none).

Basically this is the same problem that's been happening with other elements on a draw slide when the background is transparent, things render to white instead of alpha.

Also different issue is the top and left failing to render when the background is not transparent (this is logged already).
Comment 12 mwtjunkmail 2020-11-23 17:37:11 UTC
Created attachment 167504 [details]
anti-aliasing still happening on shadowed text

Still a problem in 7.2.0.0 alpha 0. The shadow appears correctly over an object, but LO Draw is still trying to anti-alias the rest of the text that is not over the object to white even when the background is transparent.

Version: 7.2.0.0.alpha0+ (x64)
Build ID: f313e27fb7f2d42247407e26e16f264e30f87ca5
CPU threads: 8; OS: Windows 10.0 Build 20262; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

In the attachment, I set the shadow offset to 2 rather than 1 to make it more obvious. Remember, this is the object shadow setting, not the text shadow option.
Comment 13 mwtjunkmail 2020-11-23 17:41:35 UTC
(In reply to mwtjunkmail from comment #12)
> Created attachment 167504 [details]
> anti-aliasing still happening on shadowed text
> 
> Still a problem in 7.2.0.0 alpha 0. The shadow appears correctly over an
> object, but LO Draw is still trying to anti-alias the rest of the text that
> is not over the object to white even when the background is transparent.
> 
> Version: 7.2.0.0.alpha0+ (x64)
> Build ID: f313e27fb7f2d42247407e26e16f264e30f87ca5
> CPU threads: 8; OS: Windows 10.0 Build 20262; UI render: Skia/Vulkan; VCL:
> win
> Locale: en-US (en_US); UI: en-US
> Calc: threaded
> 
> In the attachment, I set the shadow offset to 2 rather than 1 to make it
> more obvious. Remember, this is the object shadow setting, not the text
> shadow option.

My browser in the bug tracker is showing the background as white when it is not. It's transparent.

Same image from Imgur:  https://i.imgur.com/lotGMQ8.png