Bug 67477 - PNG Export saves image with no page background and wrong resolution
Summary: PNG Export saves image with no page background and wrong resolution
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: Other All
: medium normal
Assignee: Andras Timar
URL:
Whiteboard: BSA target:4.2.0 target:4.1.4
Keywords: regression
: 65379 69086 70395 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-29 14:06 UTC by skopidia1
Modified: 2014-02-05 19:02 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skopidia1 2013-07-29 14:06:18 UTC
Problem description: 
On exporting a large file (12 inches x 9 inches at 300dpi) from LibreOffice Draw to .PNG or .JPG format, the resolution is significantly reduced...to under 100 dpi.
Steps to reproduce:
1. Create a LibreOffice Draw Document with a page size of 12.84" x 9.25" and a background image at 300dpi resolution....

2. Mouse to FILE -- Export -- FileType .PNG -- Save
 In "Options" Window hit: 
  Resolution: 300 pixels / inch
  Width:  12.84 inches
  Height:  9.25 inches
  Compression:  1
  Interlaced:  on
  Save Transparency:  off

3. Click OK....

4.  Look at the PNG file which was just created.  It is too small, i.e. the resolution is too low.

Current behavior:
Under Operating System LinuxMint 13-Maya or LinuxPuppy Precise 5:

There is no problem here when running LO Draw 4.0.4
The problem appears in LO Draw 4.1

                                 *  *  *

              
Operating System: Linux (Other)
Version: 4.1.0.4 release
Last worked in: 4.0.4.2 release
Comment 1 crxssi 2013-07-30 19:56:22 UTC
I will confirm this is a bug and describe it as follows to illustrate the bug:

* Start Draw
* Draw something
* Select nothing
* File-> Export
* Select png as the format, name it and OK
* Under options, select a height of 1600 pixels
* Turn on the "Save Transparency"option
* Export/save it
* Examine the output file, it will NOT be 1600 pixels high

HOWEVER, if you turn OFF "Save Transparency" then it will honor the selected resolution and work correctly.

If you choose just a selection to export, instead of the entire page, then it will honor the selected resolution and work correctly.

If you choose to export as a jpeg instead of png, then it will honor the selected resolution and work correctly.
Comment 2 tommy27 2013-09-21 22:00:51 UTC
*** Bug 69086 has been marked as a duplicate of this bug. ***
Comment 3 tommy27 2013-09-21 22:05:07 UTC
bug confirmed with 4.1.0 and 4.1.1 final releases under Win7 4bit.
works fine with 4.0.5 final.

looking at the .png output it seems that 4.0.5 saves the background of the Draw page and the text or shape inside, while 4.1.x saves just the text or shape with no background so this may explain the pixel size difference

I confirm that if you turn OFF "Save Transparency" both the background and text/shapes are exported.

I see no issues saving as .jpeg (there's no "Save Transparency" option there) so I edit summary notes
Comment 4 tommy27 2013-09-21 22:14:56 UTC
*** Bug 65379 has been marked as a duplicate of this bug. ***
Comment 5 tommy27 2013-09-21 22:17:16 UTC
(In reply to comment #4)
> *** Bug 65379 has been marked as a duplicate of this bug. ***

I copy and paste this interesting post from Bug 65379 that could help the devs.

>>Tomofumi Yagi  2013-06-09 16:49:25 UTC 
>>Probably, commit a1a0830d1ac3ffabbe35bd8a0264b64f1f7a9d67( ”Resolves: #i119601# support for transparency in PNG export dialog” ) causes this problem.
Comment 6 Alexandr 2013-10-13 09:46:45 UTC
*** Bug 70395 has been marked as a duplicate of this bug. ***
Comment 7 Alexandr 2013-10-13 09:55:35 UTC
The bug seems to be similar to bug 70395 which describes the same problem with gif exporting.

When I try to export picture from libreoffice draw to GIF I can not get more size than 595x841 pixels. 

Steps to reproduce:
1. Run libreoffice draw
2. click File->Export
3. Select GIF file type
4. Press Save button
5. In window "Options" set width more than 595 pixels, set "Save tranparency" on and press OK.

Current behavior:
The created file has a size of 595x841 pixels. 

Expected behavior:
The file should have a size which was set in "Options" dialogue.

I have tried it in libreoffice 4.0.3 and 4.1.2.3 in Windows 7 and libreoffice 4.1.0-5~bpo70+3 from debian backports with the same result.

When "Save tranparency" is off everything is OK

The same problem is with png format.

Exporting to BMP or JPEG is correct.
Comment 8 Andras Timar 2013-11-18 20:14:13 UTC
This bug has been fixed on master already: 89d01a7d8028ddb765e02c116d202a2435894217

I cherry-picked it to libreoffice-4-1
Comment 9 Ilyes Gouta 2014-02-05 13:57:31 UTC
Hi,

It looks like the issue is still present in the latest Libreoffice 4.2 release.

Ilyes
Comment 10 Ilyes Gouta 2014-02-05 14:45:44 UTC
(In reply to comment #9)
> Hi,
> 
> It looks like the issue is still present in the latest Libreoffice 4.2
> release.

Actually even though the resolution field seems like not taken into account when doing the export, it's still possible to specify bigger width and height for the exported picture so to produce a higher quality output.

(Re)closing the ticket.
Comment 11 Alexandr 2014-02-05 19:02:33 UTC
Hello, Ilyes.
I can not reproduce the bug with LibreOffice draw 4.1.4.2 nor 4.2.0.4 on Debian GNU/Linux. This bug seems to be really fixed.
Maybe you met bug 37678. If you discover something else, please, report it with step by step description.