Do not scale up images smaller than the thumbnail size
Review Request #124416 - Created July 22, 2015 and submitted
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.
Tested with small and large images.
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...
Revision 2 (+3 -1)