[KPhotoAlbum] Odd issue when resizing portrait from fit screen to natural size

Robert Krawitz rlk at alum.mit.edu
Sat Oct 2 18:59:31 BST 2010

On Thu, 30 Sep 2010 22:01:23 -0400, Robert Krawitz wrote:
> I have a rather odd issue in the current CVS: if I set the viewer to
> fit the screen (1920x1200) and view a portrait mode image, when I
> resize it to natural size ('='), it doesn't appear to properly load
> the full-size image (it simply scales up the downsized image).  If the
> image is landscape, it first scales up and then within a second or so
> the full size image loads.  If I set the viewer to natural size, it
> loads correctly.  I haven't had time to sit down and try to debug
> this, but someone else may want to.  This was with 18, 8, and 6 MP
> images from different cameras.
> (Incidentally, it would be handy to have another mode, or possibly a
> checkbox or something, to set the viewer size to sticky.  Thus, if the
> default viewer is screen size, but I change it to natural size, future
> images should load natural size until I change it back.)

Here's the problem (and patch).  I had no problem zooming with the
change, so perhaps that comment is obsolete?

Index: ImageDisplay.cpp
--- ImageDisplay.cpp	(revision 1181907)
+++ ImageDisplay.cpp	(working copy)
@@ -691,7 +691,7 @@
     // The second part of this disables loading a higher resolution. The reason for this is that zooming in a rotated image is broken, and we can't find where,
     // so this is a work around to get zooming to work at all.
-    if ( _info->size() != _loadedImage.size() && _info->angle() == 0 ) {
+    if ( _info->size() != _loadedImage.size() ) {
         ImageManager::ImageRequest* request = new ImageManager::ImageRequest( _info->fileName(DB::AbsolutePath), QSize(-1,-1), _info->angle(), this );
         request->setPriority( ImageManager::Viewer );
         ImageManager::Manager::instance()->load( request );

More information about the Kphotoalbum mailing list