Bug 153976 - Raster image blurrier when size reduced
Summary: Raster image blurrier when size reduced
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Image-Caching
  Show dependency treegraph
 
Reported: 2023-03-04 21:14 UTC by Kurosh Tavassoli
Modified: 2023-07-23 12:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Images which Calc failed to resize properly (28.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-03-04 21:15 UTC, Kurosh Tavassoli
Details
Blurriness on my screen (PNG image) (140.87 KB, image/png)
2023-07-23 12:35 UTC, Kurosh Tavassoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kurosh Tavassoli 2023-03-04 21:14:55 UTC
Description:
I added a PNG file via the (menu->Insert->Image...) option. It looks just fine; However when I tried to resize the image (i.e stretch or shrink) the image reduced in quality and became blur.

Steps to Reproduce:
1. Download Wikipedia's logo
2. Open calc, ...->Menu->Insert->Insert Image and insert it
3. Try to resize it (stretch or shrink it)

Actual Results:
The image reduces in quality. It becomes blur.

Expected Results:
To be resized normally


Reproducible: Always


User Profile Reset: No

Additional Info:
I've included the bug incidence in attachments.
Comment 1 Kurosh Tavassoli 2023-03-04 21:15:35 UTC
Created attachment 185760 [details]
Images which Calc failed to resize properly
Comment 2 Stéphane Guillou (stragu) 2023-07-21 10:22:38 UTC
When scaling up a PNG, it is expected that the image will be blurry as it is a raster image and not a vector image like SVG.

But I can see that reducing the image size can make it more blurry. Same in Writer.

Original image I used to test:
https://upload.wikimedia.org/wikipedia/commons/6/63/Wikipedia-logo.png

Versions used:

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 77fca616e0bd79e0b405fd0b3543cf8e94e15df3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

As I understand it, the blurriness when the size is reduced depends on the combination of zoom level and screen resolution. Maybe this could be improved by fixing bug 56468.
Comment 3 Kurosh Tavassoli 2023-07-23 12:35:52 UTC
Created attachment 188523 [details]
Blurriness on my screen (PNG image)
Comment 4 Kurosh Tavassoli 2023-07-23 12:42:00 UTC
@ Stéphane Guillou (stragu) 
I don't think this bug is related with the one you mentioned. There they ask for a feature request. I think there are several methods for resizing images. The one used most commonly is 3-point interpolation. In the other bug they are asking for other resizing algorithms to be implemented.
I've uploaded a screenshot of how it looks like on my monitor. I've also tested on several other computers with different displays and GPUs; they results were the same.
If you use another decent program (like GIMP) or resize the image in an image viewer you can clearly see that the blurriness doesn't happen there.
[BTW how do you link a bug in comments? :)]