Bug 158623 - a few templates thumbnails could use indexed colours
Summary: a few templates thumbnails could use indexed colours
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: All All
: medium minor
Assignee: Laurent Balland
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on:
Blocks: Win-Installer-Smaller Installer-Linux
  Show dependency treegraph
 
Reported: 2023-12-10 09:52 UTC by Jérôme
Modified: 2024-02-17 08:03 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
In ODF templates, list of thumbnails images which could use indexed colours (12.02 KB, text/plain)
2023-12-10 09:52 UTC, Jérôme
Details
In ODF templates, list of thumbnails images which could use indexed colours (9.68 KB, text/plain)
2023-12-20 17:06 UTC, Jérôme
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jérôme 2023-12-10 09:52:43 UTC
Created attachment 191343 [details]
In ODF templates, list of thumbnails images which could use indexed colours

I extracted the content of LibreOffice_7.6.4_Win_x86-64.msi with msiextract.

The share/template directory contains 369 kB of thumbnails which could use indexed colours.

mkdir tmp && cd tmp
for f in $( find ../share/template -type f -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 . -iwholename '*/Thumbnails/thumbnail.png' -type f -exec file {} \; | grep -iv colormap | sed 's/:.*$//' | xargs -I {} ls -l {} ; } ; done > ../templates_thumbnails_without_indexed_colours.txt
Comment 1 Jérôme 2023-12-16 16:19:59 UTC
The thumbnails of the templates in the directory below could perhaps simply be deleted :
share/template/common/wizard
Comment 2 Jérôme 2023-12-20 17:06:42 UTC
Created attachment 191533 [details]
In ODF templates, list of thumbnails images which could use indexed colours

updated list with nightly build LibreOfficeDev_24.8.0.0.alpha0_Win_x86-64.msi

Command :
mkdir tmp && cd tmp
for f in $(find ../share/ -type f -iregex '.*\.o[dt][tspgf]$') ; do { rm -rf * && echo Into ${f}: && 7z x -bb0 -bd ${f} > /dev/null && find . -iwholename '*/Thumbnails/thumbnail.png' -type f -exec file {} \; | grep -iv colormap | sed 's/:.*$//' | xargs -I {} find "{}" -printf '%s\t%p\n' ; } ; done > ../templates_thumbnails_without_indexed_colours.txt
Comment 3 Stéphane Guillou (stragu) 2023-12-30 08:25:41 UTC
Thanks Jérôme.
Can you submit a patch for review?

Laurent, what do you think?

(In reply to Jérôme from comment #1)
> The thumbnails of the templates in the directory below could perhaps simply
> be deleted :
> share/template/common/wizard
Do you mean some of them don't have a template associated to them anymore?
Comment 4 Jérôme 2023-12-30 11:44:45 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> Can you submit a patch for review?

Not before a few months.

> Do you mean some of them don't have a template associated to them anymore?

I mean those wizards may not require a document preview image. Perhaps we could do more than using indexed colour for the preview image : just delete those preview images. The documents could still be used without preview image.
Comment 5 Laurent Balland 2023-12-31 17:56:36 UTC
(In reply to Jérôme from comment #4)
> I mean those wizards may not require a document preview image. Perhaps we
> could do more than using indexed colour for the preview image : just delete
> those preview images. The documents could still be used without preview
> image.

I agree that these previews are not needed.
Comment 6 Commit Notification 2024-02-17 07:59:56 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/39048e0c0e9af455197ff57cc2947f8fb23e8542

tdf#158623 Remove thumbnail.png of Wizard template

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.