Bug 154923 - Image Compress doesn't work
Summary: Image Compress doesn't work
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.2.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Image-Compression-Dialog
  Show dependency treegraph
 
Reported: 2023-04-20 05:59 UTC by wolf seiboth
Modified: 2023-04-20 13:00 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screen Shots from Lo 7.5.2.2 und 7.3.5.2 (110.63 KB, application/pdf)
2023-04-20 05:59 UTC, wolf seiboth
Details
files with original image and 2 Docs. (5.10 MB, application/zip)
2023-04-20 11:35 UTC, wolf seiboth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wolf seiboth 2023-04-20 05:59:28 UTC
Created attachment 186803 [details]
Screen Shots from Lo 7.5.2.2 und 7.3.5.2

When insert an Image in a writer Document, resize and position it, then it can be compressed to the actual size to reduce the file size.

So I do this:
- open context menu over the inserted picture
- select <Compress>
- I can see the image Dimension in the Document. for example: 
-    Width: 2007px / Height: 915px / Resolution: 300DPI
-    Image size: 2347 KiB
- Then click on [Calculate new Size:] and get: 7091 KiB(-202% reduction)

This is wrong.

When I do the identical steps in LO 7.3.5.2 i get the following:
- open context menu over the inserted picture
- select <Compress>
- I can see the image Dimension in the Document. for example: 
-    Width: 2007px / Height: 915px / Resolution: 300DPI
-    Image size: 2347 KiB
- Then click on [Calculate new Size:] and get: 271 kiB(88% reduction)

which is correkt
Comment 1 Stéphane Guillou (stragu) 2023-04-20 09:37:55 UTC
The percentage shown is correct ("negative reduction" is a positive change in size), and the compress dialog can upscale and make images bigger depending on settings. (see bug 145161)

Can you please provide an example document with a resized image, before it is compressed, so we can test with the same data?
And please give use consistent settings to use, as your screenshot shows different settings between the two versions (Resolution on vs off; JPEG quality vs PNG compressions).

Thank you.
Comment 2 wolf seiboth 2023-04-20 11:35:20 UTC
Created attachment 186812 [details]
files with original image and 2 Docs.

Dear Stephane,
please find the documents compressed within the zip-file.
- the original image
- a writer Doc from LiBo Version 7.3.5.2
- a writer Doc from LiBo 7.5.2.2
Comment 3 wolf seiboth 2023-04-20 11:39:58 UTC
Dear Staphane,

I think I found the problem.
Indeed the settings are different, even in my example.
The compression in LiBo 7.5.2.2 is automatically set to PNG.
I didn't notice that.
When I check the Option JPG, it works.

So this can be closed, I think.
Sorry for any inconvenience and thank you for your help.
Comment 4 Stéphane Guillou (stragu) 2023-04-20 13:00:34 UTC
No problem, thanks for being willing to contribute with a bug report! Your report made me revisit another report which led to a bug fix, so there you go :)
(Bug 153190)
Marking as "not a bug" to be more accurate.
All the best!