Bug 69888 - Export As dialog changes document dimension when pixels are changed
Summary: Export As dialog changes document dimension when pixels are changed
Status: RESOLVED DUPLICATE of bug 37678
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-27 18:16 UTC by Michael Bauer
Modified: 2013-12-09 06:29 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example odg (33.89 KB, application/vnd.oasis.opendocument.graphics)
2013-10-06 13:30 UTC, Michael Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Bauer 2013-09-27 18:16:12 UTC
I have an old Publisher document which LO very nicely imported. Saved it as a .odg and and .sxd 

Because it's used on Wikipedia, I have to save the document as a .png. I then choose File > Export > PNG > Save. But in the options window that comes up, if I change the pixels per size, LO randomly changes the document size to something else - it starts out as 21.01 x 29.71 cm and when I changed 96 p/inch to 720 (the exact figure doesn't matter, it always happens), it changes my document size to 2.8 x 3.96 cm.

I tried, just as an experiment, saving an odt as a png and I get the same problem, changing the pixel per size changes the document dimensions.
Comment 1 tommy27 2013-10-05 14:25:26 UTC
please attach test file otherwise it will be difficult to debug.
Comment 2 Michael Bauer 2013-10-06 13:30:54 UTC
Created attachment 87188 [details]
Example odg
Comment 3 Michael Bauer 2013-10-06 13:31:37 UTC
I have attached the file but this issue is really independent of the file. It always happens with all files, even if I create a new odt.
Comment 4 tommy27 2013-10-06 15:52:00 UTC
I see "cm" values changing when modifying the "pixel/cm" factor.
I have not enough experience with graphics to judge if it's a bug or not.
set status back to unconfirmed
Comment 5 Michael Bauer 2013-10-06 16:43:00 UTC
I'm not a graphics specialist *either* but when you're exporting a text or graphic in a different format, changing the resolution should not automatically change the document size. The *only* guess I can hazard is that LO is trying to maintain the same file size and that, if I increase the resolution, it reduces the document dimensions?
Comment 6 Jean-Baptiste Faure 2013-11-23 20:00:24 UTC
The dialog does not change the dimension of the image because the only real dimension of a bitmap is in pixels. Whatever you set in the dialog the size in pixels will be always the same. The relationship between pixels and cm or inch depends on the medium on which you show your image, because each medium has its own pixel size. On a screen you usually have 120 pixels/inch, on paper it depends on the printer.
If you want to modify the size (in pixels) of the exported image you should change the size of your drawing in menu Format > Page.

Conclusion: for there is no bug here.

Best regards. JBF
Comment 7 Michael Bauer 2013-11-25 06:27:55 UTC
No, I don't think what you say is right - or at least from the user point of view, sensible. Whatever the intention (if it is a feature) of this thing is, it has cost me time because I ended up with a lot of ruined files.

I know I don't know much about graphics packages as designers but I have changed the pixels per cm/inch in many documents in other packages and I have not had this problem.
Comment 8 Owen Genat (retired) 2013-12-08 23:07:04 UTC
(In reply to comment #0)
> ... in the options window that comes up, if I change the pixels per size, LO 
> randomly changes the document size to something else - it starts out as 
> 21.01 x 29.71 cm and when I changed 96 p/inch to 720 (the exact figure doesn't 
> matter, it always happens), it changes my document size to 2.8 x 3.96 cm.

It is not "randomly" but calculated. This description is exactly the same as that indicated in bug 37678, even though that bug talks about BMP it actually affects all raster formats. A workaround is provided in comment twelve of that bug:

> In the meantime, the export works correctly, at least for .png format. But the 
> dialog is a little bit tricky. You have to first set the desired DPI. Don't 
> forget to set the correct unit. With changing the DPI the 'width' field changes 
> too. You have to adjust the 'width' field to the correct value after you have set DPI.

At some point I would hope the Resolution field is decoupled from the dimension fields i.e., instead of single Size section a Dimension and Resolution section are provided, each with value and unit selections.

I will leave it to the reporter or JBF/tommy27 to RESOLVE this as a DUPLICATE of the indicated bug. Version set to 3.3.1 release as per corresponding bug.
Comment 9 tommy27 2013-12-09 06:29:50 UTC
good job Owen.
let's continue discussion over there.

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