Bug 62104 - thumbnail should use a file format with indexed colours
Summary: thumbnail should use a file format with indexed colours
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.5.7.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-10 14:12 UTC by Jérôme
Modified: 2015-01-22 11:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ODTs, JPEG graphic, and some thumbnails showing size difference. (1019.15 KB, application/zip)
2013-12-06 13:34 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jérôme 2013-03-10 14:12:44 UTC
For a writer document Thumbnails/Thumbnail.png makes 17,9 Ko.

When it is converted to gif it makes only 6,9 Ko.
Comment 1 Owen Genat (retired) 2013-12-06 13:34:05 UTC
Created attachment 90358 [details]
ODTs, JPEG graphic, and some thumbnails showing size difference.

The main graphic in the attached testkit uses this source image:

http://vrroom.naa.gov.au/Images/Certificate%20exempting%20from%20dictation%20test%20%28CEDT%291_1591944_tcm11-17598.jpg

ODT file names indicate the version of LO used to create the document under Ubuntu 10.04 running:

- v3.3.0.4 OOO330m19 Build: 6
- v3.4.6.2 OOO340m1 Build: 602
- v3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b
- v4.1.3.2 Build ID: 70feb7d99726f064edab4605a8ab840c50ec57a

Thumbnail generation under v3.3 and v3.4 series is flawed - the original image inserted into the document is not scaled correctly. The thumbnails generated by v3.5.7.2 and v4.1.3.2 are included separately for comparison. The "palette" version of each is created via ImageMagick:

$ convert thumbnail_v3572.png -type Palette thumbnail_v3572_palette.png

This is equivalent to converting to PNG8 (the 256 colour GIF equivalent) and results in a thumbnail ~40% the size of the original thumbnail PNG. This is slightly smaller than the corresponding PNG -> GIF conversion using the same tool.
Comment 2 Owen Genat (retired) 2013-12-06 13:37:03 UTC
Confirmed as per comment #1. Status set to NEW. Version left at v3.5.7.2 for the reasons indicated however it may need to have Severity set to enhancement as this functionality has never been available in LO before.
Comment 3 Commit Notification 2014-09-21 22:32:49 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2113c50b455ae67874eb61ff0dcd75c766b17002

fdo#62104 Optimize thumbnail size by using PNG8 and other tricks



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Mike §chinagl 2015-01-22 11:13:20 UTC
This bug fix comes with LibreOffice 4.4 and is mentioned in the release notes (https://wiki.documentfoundation.org/ReleaseNotes/4.4)