Bug 144780 - Anti-aliasing ON + No Transparency + Custom page size + no margins = line right and bottom of PNG draw exports
Summary: Anti-aliasing ON + No Transparency + Custom page size + no margins = line rig...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
(earliest affected) rc
Hardware: All All
: medium minor
Assignee: Not Assigned
Depends on:
Blocks: Graphics-Export
  Show dependency treegraph
Reported: 2021-09-29 00:05 UTC by xordevoreaux
Modified: 2023-01-18 08:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

png output with transparency (22.57 KB, image/png)
2021-09-29 00:08 UTC, xordevoreaux
png export with no transparency (22.87 KB, image/png)
2021-09-29 00:09 UTC, xordevoreaux
Example file (7.81 KB, application/vnd.oasis.opendocument.graphics)
2023-01-18 08:44 UTC, Buovjaga

Note You need to log in before you can comment on or make changes to this bug.
Description xordevoreaux 2021-09-29 00:05:25 UTC
If I have anti-aliasing on and I enter a custom page size for a drawing document with no margins when I don't export using transparency, then white / anti-aliased to white lines appear right and bottom of any PNG export.

If I export using transparency, it's okay.

THE PROBLEM with exporting with transparency is that nothing on a master page in Windows LO Draw shows up. It's an unfortunate either-or situation:

a. Don't export with transparency and have items on master pages export
b. Export with transparency and no items on master pages export

SO there's two different problems. 

The first problem with transparency / no master was reported here https://bugs.documentfoundation.org/show_bug.cgi?id=123973

The second problem is what I'm reporting today with the lines right and bottom of the export based on non-standard page dimensions (the destination program I'm using that consumes what I'm exporting from LO Draw wants 2048x2048 pixels EXACTLY which LO draw produces if the dimensions are 21.33″x21.33″). 

Even the slightest deviation from standard page dimensions causes the bug which I've included in the steps to reproduce.

I am not convinced that the bug I'm reporting today is the same as this bug https://bugs.documentfoundation.org/show_bug.cgi?id=117160 because that bug had more to do with SKIA / hardware acceleration only rather than anti-aliasing+weird page dimensions.

Steps to Reproduce:
1. Launch LO Draw in Microsoft Windows
2. Assure that anti-aliasing in on in Options (Options / General / View)
3. Set the page margins to None
4. Set the page dimensions to something other than default (11x8.5 to 11x8.6)
5. Set the background color of the page to black
6. Export to PNG (no transparency option selected, interlacing irrelevant)
7. Observe the exported PNG right and bottom edges

Actual Results:
A white line (or a line anti-aliased to alpha which appears white) shows up right and bottom of the exported PNG.

Expected Results:
There should never be any artifacts on the PNG export.

Reproducible: Always

User Profile Reset: No

Additional Info:
Version: (x64) / LibreOffice Community
Build ID: 0e408af0b27894d652a87aa5f21fe17bf058124c
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 1 xordevoreaux 2021-09-29 00:08:55 UTC
Created attachment 175332 [details]
png output with transparency

Result when PNG exported using transparency
Comment 2 xordevoreaux 2021-09-29 00:09:36 UTC
Created attachment 175333 [details]
png export with no transparency

result when PNG is exported with no transparency
Comment 3 xordevoreaux 2022-06-13 16:11:35 UTC
Workaround: Add even the slimmest margin all the way around the the problem goes away.

The rendering process should still extend all the way to the edge of the document, not just the margin, but the bug is still a bug.  People who create posters or signs with a bleed of color to the edge of the document would still have a problem with this bug.
Comment 4 Buovjaga 2023-01-18 08:44:43 UTC
Created attachment 184737 [details]
Example file

The images you attached are identical - there is no white line in them.

I do not reproduce the white lines. However, if I open my own "no transparency" exported PNG and zoom into the bottom, I can see it has a 1 pixel wide dark gray colour, unlike the export with transparency.
Comment 5 Buovjaga 2023-01-18 08:53:32 UTC
Same dark gray pixel in 6.3, 5.0, 4.3.