After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740877 - evince-thumbnailer can generate too large thumbnails
evince-thumbnailer can generate too large thumbnails
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-29 03:03 UTC by Sebastian Keller
Modified: 2014-11-29 09:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
thumbnailer: Use correct maximum size for thumbnail images (916 bytes, patch)
2014-11-29 03:03 UTC, Sebastian Keller
committed Details | Review

Description Sebastian Keller 2014-11-29 03:03:42 UTC
Created attachment 291760 [details] [review]
thumbnailer: Use correct maximum size for thumbnail images

I just noticed that the thumbnail images generated by the thumbnailer can be too tall when generated from documents using the portrait format:

$ ./evince-thumbnailer -s 256 file:///home/sebastian/Downloads/1205.5524v3.pdf /tmp/evince-test.png
$ file /tmp/evince-test.png
/tmp/evince-test.png: PNG image data, 256 x 331, 8-bit/color RGBA, non-interlaced


This only causes the temporary thumbnail image generated by evince-thumbnailer to be rescaled again before being stored in the thumbnail cache, which wastes some CPU cycles and probably looks a bit blurrier.



I'm attaching a patch that fixes this issue:

$ ./evince-thumbnailer -s 256 file:///home/sebastian/Downloads/1205.5524v3.pdf /tmp/evince-test.png
$ file /tmp/evince-test.png
/tmp/evince-test.png: PNG image data, 198 x 256, 8-bit/color RGBA, non-interlaced
Comment 1 Carlos Garcia Campos 2014-11-29 09:35:46 UTC
Comment on attachment 291760 [details] [review]
thumbnailer: Use correct maximum size for thumbnail images

Pushed, thanks!