Bug 122155 - Export to formats that don't include margins (PNG and GIF with transparency; EMF; WMF; EPS) is distorted / stretched
Summary: Export to formats that don't include margins (PNG and GIF with transparency; ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.4.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, notBibisectable, regression
: 71828 91768 135348 (view as bug list)
Depends on:
Blocks: Page-Margins Graphics-Export
  Show dependency treegraph
 
Reported: 2018-12-17 13:42 UTC by andreas.neubaum
Modified: 2024-07-24 15:01 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
exporting this file causes the bug (11.71 KB, application/LibreOfficeDraw)
2018-12-17 13:45 UTC, andreas.neubaum
Details
exported emf file (7.00 KB, image/emf)
2018-12-17 13:47 UTC, andreas.neubaum
Details
comparison 3.3.4 vs 3.4.0 (60.41 KB, application/pdf)
2024-06-18 04:27 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreas.neubaum 2018-12-17 13:42:09 UTC
Description:
Whenever I try to to export the attached sample odg-file to one of the formats gif, svg, png or emf the result looks distorted (see attached exports). However the export works fine for jpg and pdf files. I already tried to restart LibreOffice and my PC, reset the entire Libre Office to factory settings or launch it in safe mode but the problem still persists. However it looks like this problem only occurs for certain images: for a few odg-files similair to the attached one the same problem occurs, for others the export works just fine (however I could not yet find out what exactly causes the export problems in the odg-files, some work, others don't).

Steps to Reproduce:
1. open the attached .odg-file in LibreOffice Draw
2. click File->Export, choose emf for instance, click save
3. open the resulting emf file --> it looks distorted

Actual Results:
The resulting exported image is distorted

Expected Results:
The resulting exported image is not distorted


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: DrawingDocument
[Information guessed from browser]
OS: Windows 7
OS is 64bit: yes
Comment 1 andreas.neubaum 2018-12-17 13:45:42 UTC
Created attachment 147619 [details]
exporting this file causes the bug

when exporting this file to emf it looks distorted
Comment 2 andreas.neubaum 2018-12-17 13:47:41 UTC
Created attachment 147620 [details]
exported emf file

when exporting the attached odg-file this is the resulting emf-file. It clearly looks distorted comparing it to the original odg-file.
Comment 3 Telesto 2018-12-17 15:23:55 UTC
Repro
Version: 6.3.0.0.alpha0+
Build ID: beae6c7a7f163daad0d4dea63a3d403af2745fd1
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-06_23:55:16
Locale: en-US (nl_NL); UI-Language: en-US
Calc: CL


GIF
Border contour missing/ scaling is off + purple background

PNG
Border contour missing/ scaling is off (+ black background in Irfan view)

Everything fine with:
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 4 Hiromi Kuramoto 2018-12-18 05:00:09 UTC
I tried this reproduce in MacOS Sierra, but exported image is not distorted.

reproduce with:
Version: 6.1.3.2
Build ID: 86daf60bf00efa86ad547e59e09d6bb77c699acb
CPU threads: 4; OS: Mac OS X 10.12.5; UI render: default; 
Locale: en-US (ja_JP.UTF-8); Calc: group threaded
Comment 5 raal 2019-03-04 19:25:51 UTC
bisected GIF case

This seems to have begun at the below commit.
Adding Cc: to Armin Le Grand; Could you possibly take a look at this one? Thanks
 281611bcbe466cc1fd08ad39c8a664b92322d27a is the first bad commit
commit 281611bcbe466cc1fd08ad39c8a664b92322d27a
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Mar 9 00:46:39 2016 -0800

    source f3ff67d3c3047de3ad43f8bb3f805d82eaef0479

author	Armin Le Grand <Armin.Le.Grand@cib.de>	2016-03-02 17:21:10 +0100
committer	Michael Stahl <mstahl@redhat.com>	2016-03-02 21:29:48 +0000
commit f3ff67d3c3047de3ad43f8bb3f805d82eaef0479 (patch)
tree e6ee6051aa5baffc44e48bc4e13de6227f6eec87
parent 01ffe26fdf1c4575cffdf64468e3c1c996a2d200 (diff)
tdf#96922 Suppress EditView PageVisuailsation in GraphicExporter
Comment 6 Thorsten Behrens (allotropia) 2024-01-29 09:58:40 UTC
Un-Ccing developer for the moment, old regression & very high workload.
Comment 7 Stéphane Guillou (stragu) 2024-06-18 04:10:19 UTC
Reproduced in:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5a75414d1772d1fd998f405e3b9bd80b1f10c51f
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Same results with EMF, GIF and PNG.
With GIF and PNG, issue is not reproduced when transparency is turned off (no such option for EMF).

(In reply to raal from comment #5)
> bisected GIF case
I can't verify this, even with fresh profile. When transparency is on, I get the squished state even before f3ff67d3c3047de3ad43f8bb3f805d82eaef0479.

Testing with linux-64-releases, the first affected version is libreoffice-3.4.0rc1. libreoffice-3.3.4 does not squish the contents.

(Difference in margins between with and without transparency is inherited from OOo: margins included in no-transparency export; margins excluded in with-transparency export.)
Comment 8 Stéphane Guillou (stragu) 2024-06-18 04:14:54 UTC
*** Bug 135348 has been marked as a duplicate of this bug. ***
Comment 9 Stéphane Guillou (stragu) 2024-06-18 04:15:59 UTC
Good test ODP in bug 135348's attachment 191197 [details].
Comment 10 Stéphane Guillou (stragu) 2024-06-18 04:27:34 UTC
Created attachment 194790 [details]
comparison 3.3.4 vs 3.4.0
Comment 11 Stéphane Guillou (stragu) 2024-06-18 06:14:32 UTC
*** Bug 91768 has been marked as a duplicate of this bug. ***
Comment 12 Stéphane Guillou (stragu) 2024-06-18 12:30:09 UTC
*** Bug 71828 has been marked as a duplicate of this bug. ***
Comment 13 Stéphane Guillou (stragu) 2024-06-18 12:48:06 UTC
Reproduced with WMF as well.

Also affects EPS format, as shown in bug 71828.

In essence, all filters that discard the margins stretch the contents to the size of the page. The larger the difference in aspect ratio between inside margins vs whole page, the more noticeable

See also bug 89828's attachment 194793 [details] which shows how exports changed between versions.