I extracted the content of the LibreOffice_7.6.2_Win_x86-64.msi archive (345MB) with msiextract. A few presentations use large png images with 2^24 colours. The png images could use 256 indexed colours (chosen among 2^24 different colours). This would make those files smaller but the user doesn't see the difference.
Created attachment 190881 [details] 24 bits colours inside share/template/common/presnt/Candy.otp
Created attachment 190882 [details] 24 bits colours indexed on 8 bits inside share/template/common/presnt/Candy.otp
Thank you for the suggestion, Jérome. Laurent, what do you think?
I confirmed that some of the Indonesian set of templates contains large images. @Jérôme: could you create a patch with this new picture? If you need assistance, I can help you (even in French ;-) ). But if you feel afraid of this task, I can take care of it.
Created attachment 191194 [details] png files candidates inside ODF files in share/template result of the below command lines : mkdir tmp && cd tmp for f in $( find ../share/template -type f -size +400c -iname '*.otp' -o -iname '*.ott' -o -iname '*.ots' -o -iname '*.otg' ) ; do { rm -rf * && echo Into ${f}: && 7z x -bb0 -bd ${f} > /dev/null && find . -type f -size +300c -not -wholename './Thumbnails/thumbnail.png' -iname '*.png' -exec file {} \; | grep -iv colormap ; } ; done
@Laurent I'd be happy if you create a patch. Thank you very much. Could we possibly catch this large image with a regression test ? Maybe just something like ODF template size > 1MB ?
(In reply to Jérôme from comment #6) > @Laurent > I'd be happy if you create a patch. Thank you very much. > > Could we possibly catch this large image with a regression test ? Maybe just > something like ODF template size > 1MB ? I will create the patch thanks to your png file. However, I know almost nothing about pictures format and indexed colors. So, it could be a good idea if you propose new version of oversized pictures.
The patch is now expecting a review: https://gerrit.libreoffice.org/c/core/+/160256
I confirm this new file on gerrit is correct (from user point of view).
Created attachment 191204 [details] 2 images from Candy.otp which have been converted The larger image uses indexed colours. The smaller image uses 255 grey levels + transparent kept.
I just checked the other larger otp files. I can't achieve size reduction without loss of quality on : - Freshes.otp (1,4M) - Growing_Liberty.otp (400K) - Nature_Illustration.otp (87K) I can achieve only a tiny size reduction on : - Vintage.otp (2,5M) - Blueprint_Plans.otp (587K) - Grey_Elegant.otp (165K) - Yellow_Idea.otp (68K)
(In reply to Jérôme from comment #11) > I just checked the other larger otp files. > > I can't achieve size reduction without loss of quality on : > - Freshes.otp (1,4M) > - Growing_Liberty.otp (400K) > - Nature_Illustration.otp (87K) > > I can achieve only a tiny size reduction on : > - Vintage.otp (2,5M) > - Blueprint_Plans.otp (587K) > - Grey_Elegant.otp (165K) > - Yellow_Idea.otp (68K) Thanks for the modified pictures of Candy template. Please drop here the other pictures. I will merge with previous commit.
(In reply to Jérôme from comment #10) > Created attachment 191204 [details] > 2 images from Candy.otp which have been converted > > The larger image uses indexed colours. > The smaller image uses 255 grey levels + transparent kept. I'm not sure that the smaller image is necessary, as it contains only text. But I will first integrate it, and see later how to improve the template.
Laurent Balland committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c805fac1715e4955708299334e95d0dff47e32d7 tdf#158250 Candy Impress template: replace picture It will be available in 24.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.
Created attachment 191332 [details] Vintage.otp proposition : one image converted in grey level
Created attachment 191333 [details] Blueprint_Plans.otp pictures proposition : 1 into grey level, 2 into indexed colours
Created attachment 191334 [details] Grey_Elegant.otp proposition : 6 images into grey levels Note that several images are in 2 versions in the OTP file : SVG and PNG.
Created attachment 191335 [details] Yellow Idea proposition : 5 images into grey levels
Created attachment 191342 [details] Piano.otp proposition : 1 image in grey levels
I checked all the Impress templates. I haven't found any other savings without loss of quality.
(In reply to Jérôme from comment #20) > I checked all the Impress templates. I haven't found any other savings > without loss of quality. Thanks a lot Jérôme :-) I will propose a new patch for all these new pictures.
Laurent Balland committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6fda99d874d73f93b51e483e29b85b69333acef9 tdf#158250 Vivid, Piano templates: replace pictures 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.
Laurent Balland committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b91d7649a6c2be19439b9c042ee9520c32e621e4 tdf#158250 Grey Elegant template: replace pictures 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.
Laurent Balland committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9168109f39a587a14c65b5b22103c909d6a6054e tdf#158250 Yellow Idea template: replace pictures 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.
Laurent Balland committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7cfd3da36b54301fd51189282b39c71efd6bb894 tdf#158250 Blueprint Plans template: update images 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.
Laurent Balland committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/0be761900d69febd9ccb2a6a88b6183416d09c7b tdf#158250 Blueprint Plans template: update images It will be available in 24.2.0.0.beta2. 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.
Laurent Balland committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/736a7b476f041e06af9ab3e5185d64ab8e912ec1 tdf#158250 Yellow Idea template: replace pictures It will be available in 24.2.0.0.beta2. 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.
Laurent Balland committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/3f1b1400ca1341385f70a1f8edc3ea74ce9f1d85 tdf#158250 Grey Elegant template: replace pictures It will be available in 24.2.0.0.beta2. 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.
Laurent Balland committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/1345eba186501f75d9bc814875d7946a36679796 tdf#158250 Vivid, Piano templates: replace pictures It will be available in 24.2.0.0.beta2. 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.