Bug 132961 - No DPI setting written when compressing an image to PNG
Summary: No DPI setting written when compressing an image to PNG
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Graphics-Export Image-DPI Image-Compression-Dialog
  Show dependency treegraph
 
Reported: 2020-05-11 18:17 UTC by Telesto
Modified: 2020-05-14 21:00 UTC (History)
2 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 Telesto 2020-05-11 18:17:47 UTC
Description:
No DPI setting written when compressing an image to PNG

Steps to Reproduce:
1. Open attachment 1606952
2. Format -> Image -> Compress. Pick 300 DPI for both images
3. Save the file
4. Rename the file to zip. Open it. Open the image in Irfan view -> notice missing DPI

Actual Results:
No DPI written

Expected Results:
Should be so


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: 97a2c1fc5e376c0c00968f17a0392c6d3a5ed565
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: threaded
Comment 1 Telesto 2020-05-11 18:19:33 UTC
Also in 4.4.7.2
Comment 2 Regina Henschel 2020-05-11 23:58:11 UTC
Same happens for "Save" from context menu.
Comment 3 Jérôme 2020-05-14 19:18:18 UTC
Should we save the dpi ?

I mean the dpi has a meaning when we're compressing the image, depending on its dimensions when LO achieves the compression.

However, later the image dimensions into the document can change but the dpi into that image won't be coherent.
Comment 4 Telesto 2020-05-14 21:00:02 UTC
(In reply to Jérôme from comment #3)
The number of pixels won't change by setting a DPI value into the PNG.. The image only gets file dimensions based on the DPI setting.

The image can change in size indeed, downsizing would increase the actual DPI. Enlarging decrease the actual DPI based on the file settings.. However.. factual nothing changes.. everything is the same pixel wise. 

But yes the whole pixel/dpi matter is quite confusing.. Even more if we take screen resolution in account.. 

But he, not an expert on dimensions/dpi. Expect images without resolution get different dimensions depending on screen resolution. And even messes with crop (see some bugs in Image-DPI meta bug)