Bug 166438

Summary: broken zooming of rotated images
Product: [Applications] kphotoalbum Reporter: Jan Kundrát <jkt>
Component: ViewerAssignee: KPhotoAlbum Bugs <kpabugs>
Status: CONFIRMED ---    
Severity: normal CC: blackie, risto, tl, tuomas
Priority: NOR    
Version: SVN trunk (KDE4 version)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: proposed fix for zooming rotated images

Description Jan Kundrát 2008-07-13 12:58:06 UTC
Launch a viewer, rotate image from inside it, zoom by mouse. Wrong region is 
shown (perhaps because of decoded image cache?).
Comment 1 Tuomas Suutari 2009-07-31 16:51:19 UTC
*** Bug 202102 has been marked as a duplicate of this bug. ***
Comment 2 Hassan Ibraheem 2009-08-04 16:45:38 UTC
Created attachment 35841 [details]
proposed fix for zooming rotated images

This patch fixes this bug for me. I didn't commit it however, because I'm not sure what the purpose of Viewer::ImageDisplay::potentialyLoadFullSize() is.
So please confirm if this patch doesn't break something else.

Technical Info:
Most probably, the problem is in the condition:
_info->size() != _loadedImage.size()
a rotated image doesn't have the same size (width/height) of the original, unless it was rotated 180 (flip over).
Comment 3 Jesper Pedersen 2009-08-14 22:32:00 UTC
potentialyLoadFullSize is an optimization.
When you load an image on a display that does say 1024x768, then only that resolution is loaded from file, if you zoom in then you first zoom in that image to give instance feedback, and in the background the full sized image is loaded. You can see that after a sec or so the image is redisplayed with much more detail after a zoom.

You are basically disabling that redisplay with your patch. I've spent some time trying to figure out where it goes wrong (it does so when the larger image is done loading), without any luck. Hint if someone wants to look at it, the function pixmapLoaded is what is called when the image has been reloaded.

So I'll apply your patch, but keep the bug open.

Cheers
Jesper.
Comment 4 Risto H. Kurppa 2010-07-18 07:56:23 UTC
I don't think I can see this with svn-devel KPA in Ubuntu 10.04, can someone still confirm this?
Comment 5 Johannes Zarl-Zierl 2012-02-13 20:44:41 UTC
I can confirm this on the latest version from git. However, once you reset the view (set the zoom level to "show all"), the bug disappears...
Comment 6 Tobias Leupold 2016-01-17 09:46:49 UTC
Can somebody still reproduce this? There has been a lot of work on this part of KPA in the last years, so probably, the bug has already been fixed.