Bug 169160 - Presentation minimizer works only on one PNG image in the file
Summary: Presentation minimizer works only on one PNG image in the file
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0 target:25.8.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Presentation-Export
  Show dependency treegraph
 
Reported: 2025-10-30 20:33 UTC by Gabor Kelemen (Collabora)
Modified: 2025-11-20 20:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple example file from the Candy template (1.59 MB, application/vnd.oasis.opendocument.presentation)
2025-10-30 20:33 UTC, Gabor Kelemen (Collabora)
Details
Screenshot of the original file and its minimized versions (99.85 KB, image/png)
2025-10-30 20:45 UTC, Gabor Kelemen (Collabora)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (Collabora) 2025-10-30 20:33:47 UTC
Created attachment 203628 [details]
Simple example file from the Candy template

If the attached file, made from the Candy template, is minimized, then the file size is not reduced much.
This happens because of the 4 large PNG inside, only one gets converted to jpg and reduced in size.

1. Open attached file in Impress
2. Tools - Presentation Minimizer
3. Press Finish without changing any setting
-> the file size is changed from 1.6 Mb to 1.2, which is not a lot

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c7b3ea692f293346fbbdf2a391d9d971c34fa1f2
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

Works like this since this range in 6.0:

https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=b29bae1064c9f980cc50a667e8b96c5e370326d7..77da7b934d782153be9271605691ceee6c66233a

but, nothing is suspicious about these cleanup commits.

Anyways, just before this commit it was not good either: nothing was compressed, which is another regression compared to 5.3, where all images were properly compressed.

Unfortunately, under linux bibisect repos the oldest of 5.4 is already bad, the latest of 5.3 is still good -> bibisectrequest.
Comment 1 Gabor Kelemen (Collabora) 2025-10-30 20:45:18 UTC
Created attachment 203629 [details]
Screenshot of the original file and its minimized versions
Comment 2 m_a_riosv 2025-10-30 23:45:33 UTC
Maybe because almost all are shapes, not images?
Comment 3 Gabor Kelemen (Collabora) 2025-10-31 09:49:09 UTC
Gave it another try, looks like yesterday I was not paying attention to choose the smallest option in the first page of the wizard, which made the difference between 5.3 and 5.4.

On the other hand, if I choose the "Email (96 DPI)" option from the dropdown on the first page of the wizard, I'm getting weirdly different results since 7.5:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7243f7c706ceb49d6b3e4dfb8ff72ab43c65dd86

author	Noel Grandin <noel.grandin@collabora.co.uk>	2022-12-07 14:08:45 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2022-12-07 17:17:33 +0000
commit 7243f7c706ceb49d6b3e4dfb8ff72ab43c65dd86 (patch)

loplugin:unusedmethods

Which has indeed touched the minimizer dialog implementation.

Before this, the result from minimizing the attached file was 0.2 Mb with all 4 images changed. 
After this the result is 1Mb, with only one image changed. This behavior gives similar result to choosing "Web (150 DPI)" option, so this has confused me.

New steps:
1. Open attached file in Impress
2. Tools - Presentation Minimizer
3. Choose the  "Email (96 DPI)" option from the dropdown on the first page of the wizard
3. Press Finish without changing any other setting
-> the file size is changed from 1.6 Mb to 1.2, which is not a lot
Comment 4 m_a_riosv 2025-10-31 13:31:32 UTC
File sizes I get with different versions, on Win11

B candy (minimized)v6.odp 	133 KB 	        31/10/2025 14:24 
B candy (minimized)v7.odp 	1.072 KB 	31/10/2025 14:22 
B candy (minimized)v26.odp 	1.071 KB 	31/10/2025 14:20 
B candy.odp 	                1.628 KB	31/10/2025 14:14
Comment 5 Commit Notification 2025-11-03 16:16:44 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6998ed74d5e897312211bc8e3da243e00d0ede22

tdf#169160 - Fix after presentation minimizer works

It will be available in 26.2.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 6 Commit Notification 2025-11-03 18:13:09 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/2d1f34d51ef0fd0f35323eb6507bdab684370f75

tdf#169160 - Fix after presentation minimizer works

It will be available in 25.8.4.

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 7 Gabor Kelemen (Collabora) 2025-11-20 20:34:14 UTC
Checked in 

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 177b3d2a88afb2dfd3e89025624d8bf62b36cda4
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

now the reduced file with the E-mail profile is about 0.2 Mb.