Review Request 124416: Do not scale up images smaller than the thumbnail size

Aurélien Gâteau agateau at kde.org
Fri Aug 14 07:35:42 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124416/
-----------------------------------------------------------

(Updated août 14, 2015, 9:35 matin)


Review request for Gwenview.


Changes
-------

Using mOriginalWidth and mOriginalHeight was not a good idea: they are not initialized at this point, use originalSize instead. Plus the comparison operator was wrong. Still wondering what I was smoking...


Repository: gwenview


Description
-------

When generating thumbnails Gwenview asks the QImageReader to scale at load time if possible. Seems like the PNG reader gains support for this recently, resulting in Gwenview asking the PNG reader to scale images at load, including small images like icons, which gets scaled up to fit the thumbnail square. This is not good since it produces blurry thumbnails.

This patch checks if the image is larger than the thumbnail square before asking the QImageReader to scale.


Diffs (updated)
-----

  lib/thumbnailprovider/thumbnailgenerator.cpp 54875f5df89530edf3aacbd6c30cf893ce0eb405 

Diff: https://git.reviewboard.kde.org/r/124416/diff/


Testing
-------

Tested with small and large images.


Thanks,

Aurélien Gâteau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/gwenview-devel/attachments/20150814/5cdd93fa/attachment.html>


More information about the Gwenview-devel mailing list