Bug 132961 - No DPI setting written when compressing an image to PNG
Summary: No DPI setting written when compressing an image to PNG
Status: RESOLVED DUPLICATE of bug 132959
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:
 
Reported: 2020-05-11 18:17 UTC by Telesto
Modified: 2023-07-19 15:12 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)
Comment 5 Telesto 2022-02-11 11:16:59 UTC
Looks OK
Version: 7.4.0.0.alpha0+ (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.
Comment 7 QA Administrators 2023-02-06 03:19:30 UTC Comment hidden (obsolete)
Comment 8 Telesto 2023-02-06 08:19:11 UTC
attachment 160695 [details]
Comment 9 QA Administrators 2023-02-07 03:25:07 UTC Comment hidden (obsolete)
Comment 10 Stéphane Guillou (stragu) 2023-07-19 15:12:13 UTC
The code responsible for PNG export / save / compress likely being the same, I am consolidating these "wrong or missing DPI metadata" issues into one.

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