Bug 167590 - Calc: PNG export “Resolution” (DPI) setting has no effect on image quality (only metadata changes)
Summary: Calc: PNG export “Resolution” (DPI) setting has no effect on image quality (o...
Status: RESOLVED DUPLICATE of bug 144195
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-19 07:19 UTC by thatho
Modified: 2025-07-19 07:27 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
PNG exported in 96dpi (33.74 KB, image/png)
2025-07-19 07:22 UTC, thatho
Details
PNG exported in 300dpi (33.74 KB, image/png)
2025-07-19 07:23 UTC, thatho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thatho 2025-07-19 07:19:31 UTC
Description:
When exporting a sheet or a selection from Calc to PNG, changing the Resolution (DPI) value in the PNG Options dialog (e.g. 96 vs 300) does not change the actual pixel dimensions or visual quality of the exported image. Only the stored DPI / pixels-per-meter metadata inside the PNG changes. Thus users cannot obtain a higher-resolution (more pixels) raster image through this control.

This is unexpected because the label “Resolution (DPI)” implies the image will be rendered at that resolution (more pixels for higher DPI) rather than simply writing different metadata.

If this is intentional, the UI should clarify that the field only sets metadata. Otherwise, the export should scale the pixel output accordingly (or provide a separate scaling control).

Steps to Reproduce:
1. Open LibreOffice Calc.

2. (Optional) Enter some sample data and formatting—e.g. fill A1:E30 with text/numbers so output has detail.

3. (Optional) Select a range (or leave nothing selected if you intend to export the entire sheet).

4. Choose File ▸ Export… (or File ▸ Export As ▸ Export… depending on UI), select PNG as the format; enable Selection if you only want the chosen cells.

5. In PNG Options, note the displayed Width/Height (in pixels) and set Resolution to 96 DPI. Export (File A).

6. Repeat export, identical steps, but set Resolution to 300 DPI. Export (File B).

7. Compare File A and File B: check pixel dimensions (e.g. with file properties, ImageMagick identify, or any image viewer) and visually compare.

Actual Results:
File A and File B have identical pixel dimensions and virtually identical file sizes.

Visual appearance is the same (no increase in detail or sharpness).

Only the DPI / pixels-per-meter metadata differs (in PNG tools display it as “Resolution”).

Therefore the “Resolution” field does not influence rasterization—only metadata.

Expected Results:
Increasing DPI should proportionally increase the rendered pixel dimensions (e.g. 96→300 DPI roughly triples pixels per inch, generating a larger image for higher-quality print or downstream scaling).


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:25.2.2-0ubuntu0.22.04.1~lo3
Calc: threaded
Comment 1 thatho 2025-07-19 07:22:43 UTC
Created attachment 201897 [details]
PNG exported in 96dpi
Comment 2 thatho 2025-07-19 07:23:05 UTC
Created attachment 201898 [details]
PNG exported in 300dpi
Comment 3 Mike Kaganski 2025-07-19 07:27:27 UTC

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