Bug 158780 - Image compression dialog should grey out Resolution fields if "Reduce image resolution" is not ticked (comment 7)
Summary: Image compression dialog should grey out Resolution fields if "Reduce image r...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:24.8.0
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: Image-Compression-Dialog
  Show dependency treegraph
 
Reported: 2023-12-19 15:06 UTC by Patrick
Modified: 2024-01-11 15:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshots 1 (1.45 MB, image/png)
2024-01-02 20:53 UTC, Patrick
Details
Screenshot 2 (1.46 MB, image/png)
2024-01-02 20:54 UTC, Patrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick 2023-12-19 15:06:36 UTC
Description:
Since version 7.4, there has been a bug around in IMPRESS, which makes the tool virtually useless for me. When you insert a picture in a presentation, you usually want to compress it afterwards so as to reduce the overall file size. Unfortunately, that's no longer possible with the newer versions so that I had to resort to older ones (like 7.3, and currently 7.2). 

Steps to Reproduce:
1. Select an inserted image (e.g. a screenshot) in IMPRESS.
2. Go to FORMAT -> IMAGE -> COMPRESS... (or just right-click the image)
3. Press "Calculate New Size" and observe by how much the image will be reduced.

Actual Results:
There's no reduction in size/no compression.

Expected Results:
The size of the image should get smaller!


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.2.0.1 / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 8; OS: Mac OS X 14.1.2; UI render: default; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2024-01-02 15:36:39 UTC
I can't reproduce in:

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

I inserted a PNG image, right-click > compress, reduced the PNG compression level to a lower value than the default. New size computed was lower; filesize was smaller once saved.

Have you changed the level of compression with the slider in the dialog? What do you do in the dialog before clicking "calculate new size"?
Comment 2 Patrick 2024-01-02 20:53:45 UTC
Created attachment 191714 [details]
Screenshots 1
Comment 3 Patrick 2024-01-02 20:54:19 UTC
Created attachment 191715 [details]
Screenshot 2
Comment 4 Patrick 2024-01-02 20:56:35 UTC
Sorry, I must be more precise. I never touched the slider "PNG Compression"; I always leave it at the default value of 6. What I actually mean is the "Resolution": When changing the resolution (from 300 to 200 DPI, for example), it has no effect on the value I get after pressing "Calculate New Size".

I have added two screenshots to prove my point (I'm using version 7.4.0.1 for this, but it has been the same problem even with the latest version).

Note that there's no compression at all when going from 300 DPI to 200 DPI; the inserted picture remains very big (2.99 MB). In earlier versions (< 7.4), it was possible to make such pictures as small as 100 kB or so. This is what I'm missing! 

Looking forward to hearing from you again.
Patrick Volz
Comment 5 Stéphane Guillou (stragu) 2024-01-02 21:05:24 UTC
Thank you for the screenshots and explanation.
I see in the screenshots that the box "Reduce image resolution to" is not ticked.
Can you please tick it and see if does work?
Comment 6 Patrick 2024-01-03 13:31:17 UTC
Oh yes, you're right; the box "Reduce image resolution" was not checked! If I activate this option, it finally works as it should. So, my impression that there's a bug was obviously wrong. My problem has been solved. Thank you.

Of course, it would have been better if all the respective selection switches were grey out to make me as a user aware that this functionality is deactivated. In fact, when I check the box, and then uncheck it again, it appears greyed out. But unfortunately, not initially ...  

Regards
Patrick
Comment 7 Stéphane Guillou (stragu) 2024-01-03 22:23:11 UTC
(In reply to Patrick from comment #6)
> Of course, it would have been better if all the respective selection
> switches were grey out to make me as a user aware that this functionality is
> deactivated. In fact, when I check the box, and then uncheck it again, it
> appears greyed out. But unfortunately, not initially ...  
I agree with you that the UI should be better here. I can reproduce also on Linux that the Resolution fields are not greyed out when the dialog is opened and the box is not ticked.

Reproduced in:

Version: 7.4.7.2 / LibreOffice Community
Build ID: 723314e595e8007d3cf785c16538505a1c878ca5
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.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e71934471442a8bbba7e661d3ebe5f708627c5d6
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Same with gen VCL plugin.

In 7.3, the box was ticked by default. The issue started with Heiko's 90546b02d70cb9a9c3ee88428d99635a2f7eb22a for bug 146929 (build commit [f1aae7b6f6d5d2667bf8841b912456cfce5925e6] in the linux-64-7.4 bibisect repo).

Let's refocus this report.

Heiko, can you please have a look?
Comment 8 Heiko Tietze 2024-01-04 11:11:09 UTC
My patch for bug 146929 sets the default to false/unchecked (the dialog remembers the settings). I'll change it to true/checked.
Comment 9 Commit Notification 2024-01-04 13:00:54 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a5a0bb0c6577c82f5e31f1a81e31381fdf6c0c2e

Resolves tdf#158780 - Enable "Reduce Resolution" by default

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Telesto 2024-01-04 13:20:47 UTC
(In reply to Heiko Tietze from comment #8)
> My patch for bug 146929 sets the default to false/unchecked (the dialog
> remembers the settings). I'll change it to true/checked.

Well this resolves the issue only partially. The actual request the following:

The spinbox Width/Height and the drop down DPI and Interpolation should be disabled (grayed out) with "Reduce Image Resolution to" unchecked. This still valid request
Comment 11 Heiko Tietze 2024-01-04 13:37:38 UTC
The function exists but is not called initially, only when toggling the checkbox. Not yet...
Comment 12 Commit Notification 2024-01-05 06:36:46 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/79018bac2ed73fbfaacf661ae1272086e3ddd342

Resolves tdf#158780 - Disable resolution controls initially

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Stéphane Guillou (stragu) 2024-01-11 15:06:58 UTC
Thanks Heiko, fix verified in:

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