Bug 140465 - Saving SVG to JPG/PNG generates low res image when using "Save..." from context menu
Summary: Saving SVG to JPG/PNG generates low res image when using "Save..." from conte...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Graphics-Export
  Show dependency treegraph
 
Reported: 2021-02-17 08:44 UTC by Telesto
Modified: 2023-06-19 10:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (463.81 KB, application/vnd.oasis.opendocument.graphics)
2021-02-17 08:44 UTC, Telesto
Details
Export result (1.54 MB, image/jpeg)
2021-02-17 09:53 UTC, Telesto
Details
Export on LO7.2 on Windows10 (1.03 MB, image/jpeg)
2021-02-17 10:03 UTC, Regina Henschel
Details
Screenshot settings & size (122.28 KB, image/jpeg)
2021-02-17 10:53 UTC, Telesto
Details
Exported result at High resolution. Still low res (3.85 MB, image/jpeg)
2021-02-17 13:04 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-02-17 08:44:26 UTC
Description:
Saving SVG to JPG/PNG generates low res image

Steps to Reproduce:
1. Open the attached file
2. Right click the image -> Save as
3. Pick PNG/JPG. Make the resolution as big as you want
4. Press save & reopen

-> And there are more of these .. 

Actual Results:
Bad quality

Expected Results:
Proper


Reproducible: Always


User Profile Reset: No



Additional Info:
Found 7.2

and bug
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 1 Telesto 2021-02-17 08:44:41 UTC
Created attachment 169804 [details]
Example file
Comment 2 Regina Henschel 2021-02-17 09:44:22 UTC
I cannot confirm it. If I set 600dpi and a width of 7 inch, then I get correctly in the png-image a width of 7203 pixel. If I set 600dpi and a with of 7.48 inch in the jpg-image, I get 4494 pixel width in the image. That is correct too. Only in case of png the dpi is not written to file.
Perhaps you have forgotten, that you have to set the desired width after you have set the dpi in the dialog?
Comment 3 Telesto 2021-02-17 09:53:39 UTC
Created attachment 169808 [details]
Export result

The resolution & dimensions are fine.. but the picture itself is one pile of blur (zoom & and read the text)
Comment 4 Regina Henschel 2021-02-17 10:03:55 UTC
Created attachment 169811 [details]
Export on LO7.2 on Windows10

I cannot confirm. The text is good readable in my export. The export was done with 600dpi and 75% compression with Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 228f43f2e3c2896c227f1ea30c5d16231acf66da
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL

(It is my own build but should correspond to current daily build.)
Comment 5 Regina Henschel 2021-02-17 10:05:03 UTC
The missing dpi-info in png export is already tracked in bug 132959.
Comment 6 Telesto 2021-02-17 10:53:29 UTC
Created attachment 169820 [details]
Screenshot settings & size

63 KB can't be OK..
Comment 7 Telesto 2021-02-17 10:56:03 UTC
(In reply to Telesto from comment #6)
> Created attachment 169820 [details]
> Screenshot settings & size
> 
> 63 KB can't be OK..

BTW, please take default screen resolution into account.. my screen is 96 DPI. Which might make a big difference. As the image looks to me as thumbnail image at 96 DPI being zoomed in.
Comment 8 Regina Henschel 2021-02-17 12:41:23 UTC
Your image is not large enough to display the text.
The original svg-image has a character height of about 0.06cm for an svg-image height of 15.131cm. That is the character has a height of about 1/252 of the image height.
If you generate an image of 5.33cm height the character height will become about 0.0211cm = 0.00832 inch. With 300dpi this is a height of 2.5 dot for a character. For to get a readable character you need much more dots. From times of dot-matrix printer you know, that at least 8 dots are needed with specialized fonts and only 24 dots had given good readable text at that times.
Comment 9 Telesto 2021-02-17 13:04:10 UTC
Created attachment 169823 [details]
Exported result at High resolution. Still low res

JPG export 100% quality. 600 DPI. 20 x 25,10 cm. Filesize: 4.034.560 bytes
And still lovely quality

FWIW: Right Click image -> Save as & pick JPG & file name.. 

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 28555fc345ac2ccdda0e4e0f3c812c646befe68b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

-> Same with Raster
Comment 10 Telesto 2021-02-17 13:06:19 UTC
(In reply to Telesto from comment #9)
> -> Same with Raster

And with OpenGL and in safe-mode
Comment 11 Regina Henschel 2021-02-17 14:00:55 UTC
(In reply to Telesto from comment #9)
> FWIW: Right Click image -> Save as & pick JPG & file name.. 

That is the import fact!

With using "Save..." from context menu, I can reproduce the problem.

Workaround: Use File > Export.
Comment 12 Telesto 2021-02-17 15:01:51 UTC Comment hidden (obsolete)
Comment 13 Stéphane Guillou (stragu) 2023-06-19 10:15:47 UTC
My guess is that the source cause is bug 144195: changing the Resolution "silently" changes the dimensions (which is inherited from OOo).

Telesto, do you agree we can mark as duplicate?