Bug 146799 - Low Resolution Chart "Export As Image" PNG
Summary: Low Resolution Chart "Export As Image" PNG
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Graphics-Export
  Show dependency treegraph
 
Reported: 2022-01-16 16:01 UTC by Tex2002ans
Modified: 2024-07-13 19:08 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
16" x 9" Chart (15.81 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-16 16:02 UTC, Tex2002ans
Details
LibreOffice 6.0.3.2 - Exported Chart (9.80 KB, image/png)
2022-01-16 16:03 UTC, Tex2002ans
Details
LibreOffice 6.4.4.2 - Exported Chart (5.63 KB, image/png)
2022-01-16 16:04 UTC, Tex2002ans
Details
LibreOffice 7.2.5.2 - Exported Chart (5.24 KB, image/png)
2022-01-16 16:07 UTC, Tex2002ans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tex2002ans 2022-01-16 16:01:15 UTC
Description:
I have a 16"x9" chart in a spreadsheet I created years ago.

(Chart originally resized by Right-Clicking chart > Position and Size > **Size** Width: 16" Height: 9".)

If I "Export As Image", the resulting PNG is very low resolution compared to how it used to be.

Steps to Reproduce:
0. Open attached ODS document.
1. **Right-Click** the chart > **Export As Image**, then output a PNG.

Actual Results:
A 943x530 PNG.

Expected Results:
A 1536x864 PNG. (16"x9" * 96 dpi)


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.5.2 (x64) / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

- - -

Note: I first reported this on the LO subreddit:

https://www.reddit.com/r/libreoffice/comments/gsyp3c/low_resolution_export_as_image_png_libreoffice/

This regression was introduced between 6.0.3.2 and 6.4.4.2.

- - -

Other Workaround Oddities

If you Right-Click the chart + copy/paste into GIMP, you get a much higher (original?) resolution image...

In:

Version: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: default; VCL: win;
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

I got a:

- 1536x864 image

(matching LO 6.0.3.2's "Export as PNG" resolution!)

In 7.2.5.2, I now get an odd:

- 1477x862 image

(not matching any!)
Comment 1 Tex2002ans 2022-01-16 16:02:41 UTC
Created attachment 177579 [details]
16" x 9" Chart
Comment 2 Tex2002ans 2022-01-16 16:03:36 UTC
Created attachment 177580 [details]
LibreOffice 6.0.3.2 - Exported Chart
Comment 3 Tex2002ans 2022-01-16 16:04:16 UTC
Created attachment 177581 [details]
LibreOffice 6.4.4.2 - Exported Chart
Comment 4 Tex2002ans 2022-01-16 16:07:31 UTC
Created attachment 177582 [details]
LibreOffice 7.2.5.2 - Exported Chart
Comment 5 Kevin Suo 2022-01-16 16:34:04 UTC
I can confirm this.

Works OK in "lastest" of the 6.1 repo, and broken in "oldest" of 6.4 repo, thus this is a regression in 6.2 or 6.3. Need someone who has these two repos to bibisect.
Comment 6 m_a_riosv 2022-01-17 10:09:56 UTC
Exporting with the context menu, doesn't ask for the parameters, what does Menu/File/Export, can that help?
Comment 7 raal 2022-01-17 18:00:03 UTC
This seems to have begun at the below commit.
Adding Cc: to Armin Le Grand; Could you possibly take a look at this one?
Thanks
 5c3d2b64707bda48d657225e0fbd744f70ada793 is the first bad commit
commit 5c3d2b64707bda48d657225e0fbd744f70ada793
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Fri Aug 17 21:35:11 2018 +0200

    source 046df0a876b3d948bb1e14443c00c180bc8cccaa

https://git.libreoffice.org/core/+/046df0a876b3d948bb1e14443c00c180bc8cccaa
  tdf#105998: Enhanced fix for MetafileToBitmap at better place
Comment 8 Armin Le Grand (allotropia) 2022-01-24 09:15:07 UTC

*** This bug has been marked as a duplicate of bug 126319 ***
Comment 9 Tex2002ans 2024-03-24 22:03:11 UTC
Hey Armin,

I don't believe this exact bug was ever fixed. Looks like the:

- "Duplicate" bug 126319 was fixed/closed.
   - Fixed in 7.3.2 + 7.4.0.
   - I just tested on 24.2.1, and it was still good.
   - raal's Comment 7 bisected THIS issue to the THAT same commit.

But this specific "low resolution" export issue is still broken.

- - -

I can still reproduce my comment 0 in:

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

I even bibisected everything in:

- win64-24.2
- linux-64-24.2
- linux-64-7.6
- linux-64-7.4
- [...]

and then:

- linux-64-6.2

leads me to the exact commit raal hit in comment 7.

- - -

Steps to Reproduce:

In Calc:

0. Open attachment 177579 [details].
1. "Right-Click > Export as Image" on the chart.
2. Name your file + save as PNG.

Actual Results:

- A 943x530 PNG.

Expected Results:

- A 1536x864 PNG. (16"x9" * 96 dpi)
Comment 10 Aron Budea 2024-05-25 15:03:44 UTC
Indeed, the exported image is still 943x530 pixels, so it seems the issue isn't fixed.

Tested with LO 24.8.0.0.alpha1+ (71f3be3bee2e8a07f85594c02a9b44627b219e95) / Ubuntu.
Comment 11 Supapong A. 2024-06-18 13:09:15 UTC
This bug happened long time before 2022. I have been waiting for this bug to be fixed for a decade. I remembered that, since 2015, I used Draw to create a banner with mixed images and exported it with customized settings of output size or resolution and I always get the output with exactly the same dimension. I also used Calc to do many things with the need of exporting as images and I got the same results.

Still waiting for the feature. And still wonder why the importance of this bug is set to minor or medium. I find that one of the most important feature in LibreOffice is the PDF Export which is available long before MS Office has it. And I find that many times we need to export something as nice as PDF but without the possibility for anyone to extract embeded images from it so Image Export is nearly as important as PDF export.
Comment 12 Mike Kaganski 2024-07-13 19:08:57 UTC
Fixed by 37217909f2e7c042eab9a8b5eb1ab0a88cdda513 (the said commit relaxed the limit of 500000 square pixels into 8Mi (which is also not that much, but matches a limit set in another place for consistency)).