Bug 132961 - No DPI setting written when compressing an image to PNG
Summary: No DPI setting written when compressing an image to PNG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Graphics-Export Image-DPI Image-Compression-Dialog
  Show dependency treegraph
Reported: 2020-05-11 18:17 UTC by Telesto
Modified: 2022-08-09 15:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


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
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: (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
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)
Comment 5 Telesto 2022-02-11 11:16:59 UTC
Looks OK
Version: (x64) / LibreOffice Community
Build ID: 42c5506a9e9ef58efd8193a193464e3b49d481ca
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 6 Timur 2022-08-09 15:12:14 UTC
Open attachment ? 
Please write and retest.