Bug 132657 - UI: Compress Image, reducing image resolution actually increases resolution
Summary: UI: Compress Image, reducing image resolution actually increases resolution
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: needsDevAdvice
: 131116 (view as bug list)
Depends on:
Blocks: 107875 Image-DPI Image-Compression-Dialog
  Show dependency treegraph
Reported: 2020-05-03 20:47 UTC by Telesto
Modified: 2023-10-14 11:47 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Example file (574.52 KB, application/vnd.oasis.opendocument.text)
2020-05-03 20:48 UTC, Telesto
Screenshot (51.00 KB, image/jpeg)
2020-05-03 20:48 UTC, Telesto

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-05-03 20:47:52 UTC
Compress Image, reducing image resolution actually increases resolution

Steps to Reproduce:
1. Open the attached file
2. Format -> Image -> Compress
3. Actual image dimensions: 640 x 480 px -> After compress 1599x1200 at 300 DPI

Actual Results:
The checkbox is misleading, does not always do what is promissed

Expected Results:
Redesign the compress dialog. 

A) Show the boxes to be interconnected.  Change DPI lowers/increases (height/width). Some as touching height/width.. affects resolution

B) Please add a similar to the one for PNG/JPG export options -> File -> Export -> select JPG/PNG format -> Press Save. I don't really like to work with pixels... and of course.. more coherent..  

C) And the 'actual dimensions' stuff needs to go. Why do I want to know the size at, for me 96 DPI. The file itself has a DPI ratio already...

D) Let compress resave the file in the current image format (if png/jpg). Why convert JPG to PNG/ and backwards

Reproducible: Always

User Profile Reset: No

Additional Info:
Version: (x64)
Build ID: b8fb7ecd9cdbe1898c41eaecd9894df8e8f01e25
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Comment 1 Telesto 2020-05-03 20:48:05 UTC
Created attachment 160297 [details]
Example file
Comment 2 Telesto 2020-05-03 20:48:19 UTC
Created attachment 160298 [details]
Comment 3 Heiko Tietze 2020-05-04 11:09:01 UTC
So you mean _Reduce_ image resolution is sometimes _Enlarge_ and we better name it _Change_? 

a) The width/height/resolution fields depend on each other and changing the dpi result in larger/smaller dimension.
b) AFAIU, jpg and png compression are just two methods here and both can be applied to the selected image.
c) I like this info. And it's just one label.
d) I believe it's a misconception. Admittedly the user is not to blame. So some dev input needed too. Tomaz, you are the expert for images :-).
Comment 4 Heiko Tietze 2020-05-04 11:16:19 UTC
telesto - See Also - bug 115464

Good catch, now I cannot object anymore. But let's forward the discussion to this ticket (incl. a mockup).

*** This bug has been marked as a duplicate of bug 115464 ***
Comment 5 Telesto 2020-05-04 12:20:25 UTC
(In reply to Heiko Tietze from comment #4)
> telesto - See Also - bug 115464

I can object, the see also was for inspiration purposes only.. This is about the Writer Compress Dialog, not the PNG export dialog
Comment 6 Tomaz Vajngerl 2020-05-04 13:51:48 UTC
a) If there is an easy way how we can show visually these are inter-connected then sure.

b) What should we add exactly? The logical dimensions don't make sense because that would change the size of the image in the document and I don't think this is the job of this dialog.

c) Sure, for logical dimensions, but pixel size is important. 

d) Because it depends on what you want to do. JPEG compression is lossy, PNG lossless. If you have a PNG that takes a lot of space and want to compress it more - you can change to JPEG. If you have a JPEG and don't want to degrade the image more, you can choose to save it as PNG.
Comment 7 Telesto 2020-05-08 21:11:20 UTC
I would love a mockup... in the same direction as attachment 142672 [details]
Comment 8 Justin L 2020-05-14 15:16:27 UTC
*** Bug 131116 has been marked as a duplicate of this bug. ***
Comment 9 Telesto 2020-05-14 19:03:39 UTC
Quote from Justin L bug 131116 
"Image compression appears to be more accurately a "resize" rather than a compression. The default compression value is 300dpi (in LO 7.0), and for an image with a smaller DPI already, it will expand the image to 300dpi, increasing the filesize for no apparent benefit.  I can't really think of a reason why anyone would want to force a reverse compression, so probably it should just do nothing in this case. This will especially be important when <hopefully> there will be option to compress all images in the document.

When used interactively, it could be argued that the user has all the information they need to determine whether or not to compress. True enough for a knowledgable user, but there can probably be some improvements here. One possibility would be to set the default to min(currentViewsizeDPI, 300) [an interesting easyhack?]. The other option would be to add a (by default enabled) checkbox to only compress."
Comment 10 Heiko Tietze 2020-07-06 09:41:07 UTC
Mockup for a UX/UI solution with mockups is in bug 115464.
Comment 11 Tomaz Vajngerl 2020-07-07 07:01:41 UTC
Compression dialog can't use the same solution.
Comment 12 edera 2021-09-07 18:39:46 UTC
> Mockup for a UX/UI solution with mockups is in bug 115464.
e.g. https://bugs.documentfoundation.org/show_bug.cgi?id=115464#c40
Comment 13 Heiko Tietze 2021-09-08 06:41:24 UTC
(In reply to edera from comment #12)
> > Mockup for a UX/UI solution with mockups is in bug 115464.

attachment 168197 [details]
Comment 14 tylergloria 2022-09-30 09:21:10 UTC
I can object because the view was just intended as an inspiration. The PNG export dialogue is unrelated to this and is not discussed here. I also looked at https://jpegcompress.com site for interior design.
Comment 15 Stéphane Guillou (stragu) 2022-12-16 18:27:41 UTC
Please also see some very relevant comments in Bug 145161.
Comment 16 Jérôme 2023-04-20 18:41:55 UTC
See bug 77407 comment 9, especially the resolution limit which prevents the compression if the image resolution is below this limit.
Comment 17 tylergloria 2023-10-14 11:47:44 UTC
(In reply to tylergloria from comment #14)
> I can object because the view was just intended as an inspiration. The PNG
> export dialogue is unrelated to this and is not discussed here. I also
> looked at https://jpegcompressor.com site for interior design.