Bug 139251 - Black text shadow not rendered correctly in exported gif and png files, when Save transparency is selected
Summary: Black text shadow not rendered correctly in exported gif and png files, when ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Graphics-Export
  Show dependency treegraph
 
Reported: 2020-12-26 22:36 UTC by Colin Brown
Modified: 2023-03-22 16:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
GIF output (33.26 KB, image/gif)
2021-04-09 18:41 UTC, xordevoreaux
Details
PNG output (66.63 KB, image/png)
2021-04-09 18:41 UTC, xordevoreaux
Details
JPG output (35.77 KB, image/jpeg)
2021-04-09 18:41 UTC, xordevoreaux
Details
Source Draw file 29th Sept 22 (12.37 KB, application/vnd.oasis.opendocument.graphics)
2022-09-29 16:40 UTC, Colin Brown
Details
png file exported from shadow demo.odg (22.34 KB, image/png)
2022-09-29 16:43 UTC, Colin Brown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Brown 2020-12-26 22:36:53 UTC
Description:
Black shadow from white text on a blue background is rendered as light grey rgb 206,206,206 (Hex CECECE) when the page is exported as as gif file, and as a transparent area when the page is exported as as png file. Thw same page exported jpg file is correctly rendered. 

Checked this was not problem with the program used to examine the files by opening them again with a different program.

Steps to Reproduce:
1.Open a new Draw document.
2.Create a text box with blue area and white text (Big text makes the problem easier to see. I used 44pt but even bigger would be good.)
3. Toggle text shadow on while the text box is selected.
4. Export the page as a gif file.
5. Export the page as a png file.
6. Export the page as a jpg file.

6. Examine the exported files with any graphics display program. (I used paint.net.)




Actual Results:
The black text shadow is correctly rendered in the display.
The gif file will have text shadows in light grey.
The png file will have text shadows which are transparent
The jpg file will have black text shadows. (Correct)

Expected Results:
Exported gif and png files should have had shadows rendered as black, like the exported jpg file.


Reproducible: Always


User Profile Reset: No



Additional Info:
Tried the same test on my wife's windows laptop which is running LibreOffice 6.3.5.2 and it rendered an exported gif file correctly with black shadows. But an exported png file had transparerent shadows, as described above.

Tried exporting to pdf and to svg (From 7.0.0.3). Both rendered the shadows correctly as black.
Comment 1 xordevoreaux 2021-04-09 18:40:31 UTC
Not able to reproduce in 

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 5e53fe7b53017068d183e923f6a77f0afaf31d67
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

See attached.

Be sure you didn't select Enable Shadow (as opposed to text shadow) because Enable Shadow (an object shadow, not a text shadow) defaults to light gray.
Comment 2 xordevoreaux 2021-04-09 18:41:00 UTC
Created attachment 171069 [details]
GIF output
Comment 3 xordevoreaux 2021-04-09 18:41:26 UTC
Created attachment 171070 [details]
PNG output
Comment 4 xordevoreaux 2021-04-09 18:41:52 UTC
Created attachment 171071 [details]
JPG output
Comment 5 Buovjaga 2022-04-01 08:15:42 UTC
(In reply to xordevoreaux from comment #1)
> Be sure you didn't select Enable Shadow (as opposed to text shadow) because
> Enable Shadow (an object shadow, not a text shadow) defaults to light gray.

Colin: can you check this?

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 6 QA Administrators 2022-09-29 03:55:55 UTC Comment hidden (obsolete)
Comment 7 Colin Brown 2022-09-29 16:40:40 UTC
Created attachment 182732 [details]
Source Draw file 29th Sept 22

This is the Draw file that produced shadow demo.png using V 7.3.6.2
Comment 8 Colin Brown 2022-09-29 16:43:13 UTC
Created attachment 182733 [details]
png file exported from shadow demo.odg
Comment 9 Colin Brown 2022-09-29 16:50:45 UTC
Tested this in V 7.3.6.2 today 29th Sept 2022. Bug is still present.  Shadow was added as a character property in Draw while the text box was selected.

Don't really understand why others seem to be struggling to reproduce it.
Comment 10 QA Administrators 2022-09-30 03:55:04 UTC Comment hidden (obsolete)
Comment 11 Rajasekaran Karunanithi 2023-02-19 23:18:05 UTC
Can't confirm in LO 7.6 Dev release under Windows 10(x64).All(gif,png and jpg)  exports gave same outputs from source file.There were no grey shadows.


Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a834bbad8295cba0ca88a91a524aad48640271ec
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-IN (en_IN); UI: en-US
Calc: threaded
Comment 12 Buovjaga 2023-03-22 16:31:03 UTC
(In reply to Colin Brown from comment #7)
> Created attachment 182732 [details]
> Source Draw file 29th Sept 22
> 
> This is the Draw file that produced shadow demo.png using V 7.3.6.2

(In reply to Colin Brown from comment #8)
> Created attachment 182733 [details]
> png file exported from shadow demo.odg

I reproduce the png result with the file, but only if Save transparency is checked in the export dialog. This has been like this since a1a0830d1ac3ffabbe35bd8a0264b64f1f7a9d67

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b5c3a7502f7ff6ccf0f829c1f3a2ba50b8584c41
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_FI); UI: en-US
Calc: threaded

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 74f398bb58510087cc4a11bb2253715771a2c6b2
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 22 March 2023