Bug 136584 - Export Selection crops part of the image
Summary: Export Selection crops part of the image
Status: RESOLVED DUPLICATE of bug 126319
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-08 20:12 UTC by Rafael Lima
Modified: 2023-02-04 19:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
ODG file with the drawing (14.11 KB, application/vnd.oasis.opendocument.graphics)
2020-09-08 20:12 UTC, Rafael Lima
Details
PNG file generated while exporting selection (98.15 KB, image/jpeg)
2020-09-08 20:13 UTC, Rafael Lima
Details
ODG file with thick border rectangle (9.22 KB, application/vnd.oasis.opendocument.graphics)
2021-01-17 18:38 UTC, nick.parlante
Details
PNG export of thick border rectangles (1.42 KB, image/png)
2021-01-17 18:39 UTC, nick.parlante
Details
ODG file with simple circle (10.15 KB, application/vnd.oasis.opendocument.graphics)
2021-07-01 06:49 UTC, Gerhard Schaber
Details
JPG file with cropped circle when exporting as selection (46.09 KB, image/jpeg)
2021-07-01 06:50 UTC, Gerhard Schaber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2020-09-08 20:12:05 UTC
I use Draw very frequently to make diagrams and flowcharts. However, when I try to export the selection as PNG or JPG, it always crops the last few pixels at the right and bottom of the image.

Attached to this bug report:
1) ODG file with the original drawing
2) PNG file with the exported result (using "Selection" while exporting)

One interesting thing is that even if I draw a transparent rectangle around the image and select it while exporting, LO Draw simply ignores the rectangle. I thought that this would be a workaround to make LO Draw export the whole image.

I am using LibreOffice 7.0.1.2 on Linux, but this bug is present since at least LO 6.3, which is when I started noticing it.
Comment 1 Rafael Lima 2020-09-08 20:12:51 UTC
Created attachment 165293 [details]
ODG file with the drawing
Comment 2 Rafael Lima 2020-09-08 20:13:37 UTC
Created attachment 165294 [details]
PNG file generated while exporting selection
Comment 3 nick.parlante 2021-01-17 18:38:20 UTC
Created attachment 168956 [details]
ODG file with thick border rectangle
Comment 4 nick.parlante 2021-01-17 18:39:30 UTC
Created attachment 168957 [details]
PNG export of thick border rectangles
Comment 5 nick.parlante 2021-01-17 19:01:23 UTC
It's easy to run into this bug if you make drawings to go in web pages, and I can help narrow the version for it. I see this bug on 7.1 rc1, and I see it in 6.4, but I do not see it in 5.4.

The exported PNG is a little too small at its edges, so the exported shapes are clipped inward, looking asymmetric and wrong. The bug is most pronounced if the shape borders are thick, so I added sample files showing that.
Comment 6 Rafael Lima 2021-01-17 19:23:32 UTC
I have just tested the files provided by Nick on LO 7.0.3 and the issue persists.

I also tried grouping the objects before exporting them, but the results were the same.

Version: 7.0.3.1
Build ID: 00(Build:1)
CPU threads: 16; OS: Linux 5.8; UI render: default; VCL: kf5
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.0.3-0ubuntu0.20.10.1
Calc: threaded
Comment 7 nick.parlante 2021-02-04 02:04:28 UTC
This bug is still a problem for me.

As a workaround, maybe of interest to the OP .. export selection as SVG does not appear to have this problem. The browsers can render SVG natively, so it really works even a little better than PNG.

I'd prefer to stay in LibreOffice, but Inkscape has the ability to save/edit SVGs itself, so that's a possible workflow for creating and editing art files directly without an export step.
Comment 8 Gerhard Schaber 2021-07-01 06:49:43 UTC
Created attachment 173300 [details]
ODG file with simple circle
Comment 9 Gerhard Schaber 2021-07-01 06:50:51 UTC
Created attachment 173301 [details]
JPG file with cropped circle when exporting as selection
Comment 10 Gerhard Schaber 2021-07-01 06:52:44 UTC
Still in 7.1.4.
Comment 11 Natali Eroshenko 2021-08-11 13:21:52 UTC
repro in Version: 7.1.5.2 (x64) / LibreOffice Community
Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: threaded
Comment 12 Natali Eroshenko 2021-08-11 13:22:22 UTC
repro in 
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: threaded
Comment 13 Timur 2021-09-17 11:41:57 UTC
I didn't test but per description seems to be the duplicate of bug 132590.

*** This bug has been marked as a duplicate of bug 132590 ***
Comment 14 Timur 2021-09-17 11:42:45 UTC
Note another bug 126319.
Comment 15 Rafael Lima 2021-09-17 12:09:28 UTC
(In reply to Timur from comment #13)
> I didn't test but per description seems to be the duplicate of bug 132590.
> 
> *** This bug has been marked as a duplicate of bug 132590 ***

I checked bug 132590 and indeed it is a dup.
Comment 16 Aron Budea 2023-02-04 19:14:56 UTC

*** This bug has been marked as a duplicate of bug 126319 ***