[KPhotoAlbum] Zooming issue

Johannes Zarl-Zierl johannes at zarl-zierl.at
Fri Oct 19 17:34:40 BST 2018


Hello Angel,

I've added some debug code to ImageDisplay in git master. Could you please 
build the newest version and then run the following in a console window?

export QT_LOGGING_RULES='kphotoalbum.Viewer=true'
kphotoalbum --demo

The result should look something like the attached example. Can you please do 
some zooming that exhibits the bug and send me the output?

Thanks in advance,
  Johannes


Am Freitag, 19. Oktober 2018, 17:11:17 CEST schrieb Johannes Zarl-Zierl:
> Hello Angel,
> 
> Sorry for not getting back to you sooner!
> 
> I have some further questions for you:
> You've written that you saw the problem for some time now. Do you know when
> it started initially?
> 
> I assume that fullscreen vs. windowed viewer does not make a difference…
> 
> Do you have the same problem with all images, or is it dependent on the
> image size? Do you see the same problem with the demo image set?
> 
> Cheers,
>   Johannes
> 
> Am Mittwoch, 17. Oktober 2018, 00:52:38 CEST schrieb Angel Lopez:
> > I did the suggested modification but it makes no effect. Indeed, the
> > function "zoomPixelForPixel", had it already reversed. So commenting
> > "potentialyLoadFullSize" in the zoom() function, solves the problem for
> > mouse zoom and "+" and "-" keyboard zooming, but pressing "=" for zoom
> > pixel for pixel, still goes wrong (as potentialyLoadFullSize was not
> > commented inside it).
> > 
> > So, with a call to potentialyLoadFullSize commented inside zoom, behavior
> > is as expected and very fast zooming.
> > With that call not commented, but "m_reloadImageInProgress = false" inside
> > the function "potentialyLoadFullSize" (original value was true) Then after
> > zooming it goes back to original. But it takes some time (like one second
> > in my computer)
> > 
> > 
> > As additional information, I'm working on an old laptop with screen
> > resolution 1366x768.
> > 
> > If you want I can do all the test you want.
> > 
> > Thank you again !!
> > 
> > Regards,
> > 
> > Angel.
> > ______________________________
> > ----------- Angel ------------
> > 
> > 
> > 
> > El mar., 16 oct. 2018 a las 22:42, Johannes Zarl-Zierl (<
> > 
> > johannes at zarl-zierl.at>) escribió:
> > > Hi Angel,
> > > 
> > > Am Montag, 15. Oktober 2018, 00:42:26 CEST schrieb Angel Lopez:
> > > > In ImageDisplay.cpp:
> > > > in function: void Viewer::ImageDisplay::zoom( QPoint p1, QPoint p2 )
> > > > 
> > > > if I comment out : potentialyLoadFullSize(), then it works as expected
> > > 
> > > (not
> > > 
> > > > exactly because the first time I draw a rectangle no zoom if
> > > > performed).
> > > > It seems that a call to potentialyLoadFullSize() is already made in
> > > > the
> > > > resizeEvent()  function.
> > > 
> > > That is kind of surprising, because the potentiallyLoadFullsize() does
> > > not
> > > (directly) manipulate the view position or zoom level. I'm suspecting
> > > that
> > > it
> > > interacts with cropAndScale() and causes that function to misbehave…
> > > 
> > > Can you try and see what happens if you switch the position of the
> > > potentialyLoadFullSize() call with the call to cropAndScale(), i.e. what
> > > happens if cropAndScale is done *before* potentiallyLoadFullSize?
> > > 
> > > 
> > > Cheers,
> > > 
> > >   Johannes
> 
> _______________________________________________
> KPhotoAlbum mailing list
> KPhotoAlbum at mail.kdab.com
> https://mail.kdab.com/mailman/listinfo/kphotoalbum

-------------- next part --------------
$ ./kphotoalbum --demo
kphotoalbum.Viewer: setImage( "new_wave_1.jpg" , true )
kphotoalbum.Viewer: Loading full size image for  "new_wave_1.jpg"
kphotoalbum.Viewer: pixmapLoaded(): Zoom region was QPoint(0,0) - QPoint(0,0)
kphotoalbum.Viewer: pixmapLoaded(): Zoom region changed to QPoint(0,0) - QPoint(0,0)
kphotoalbum.Viewer: cropAndScale(): using cropped image QPoint(0,0) - QPoint(0,0)
kphotoalbum.Viewer: cropAndScale(): scaling image to 640 x 455
kphotoalbum.Viewer: updateZoomPoints(): Zoom region reset to QPoint(0,0) - QPoint(549,800)
kphotoalbum.Viewer: cropAndScale(): using full image.
kphotoalbum.Viewer: cropAndScale(): scaling image to 640 x 455
kphotoalbum.Viewer: cropAndScale(): using full image.
kphotoalbum.Viewer: cropAndScale(): scaling image to 418 x 291
kphotoalbum.Viewer: cropAndScale(): using full image.
kphotoalbum.Viewer: cropAndScale(): scaling image to 418 x 291
kphotoalbum.Viewer: setImage( "blackie.jpg" , true )
kphotoalbum.Viewer: updateZoomPoints(): Zoom region reset to QPoint(0,0) - QPoint(418,286)
kphotoalbum.Viewer: cropAndScale(): using full image.
kphotoalbum.Viewer: cropAndScale(): scaling image to 418 x 291
kphotoalbum.Viewer: zoomIn()
kphotoalbum.Viewer: zoom(42,29, 376,257)
kphotoalbum.Viewer: Loading full size image for  "blackie.jpg"
kphotoalbum.Viewer: cropAndScale(): using cropped image QPoint(42,27) - QPoint(376,259)
kphotoalbum.Viewer: cropAndScale(): scaling image to 418 x 291
kphotoalbum.Viewer: pixmapLoaded(): Zoom region was QPoint(42,27) - QPoint(376,259)
kphotoalbum.Viewer: pixmapLoaded(): Zoom region changed to QPoint(80,52) - QPoint(720,496)
kphotoalbum.Viewer: cropAndScale(): using cropped image QPoint(80,52) - QPoint(720,496)
kphotoalbum.Viewer: cropAndScale(): scaling image to 418 x 291
kphotoalbum.Viewer: zoomOut()
kphotoalbum.Viewer: zoom(0,-4, 800,552)
kphotoalbum.Viewer: cropAndScale(): using cropped image QPoint(0,-4) - QPoint(800,552)
kphotoalbum.Viewer: cropAndScale(): scaling image to 418 x 291
kphotoalbum.Viewer: zoomPixelForPixel()
kphotoalbum.Viewer: updateZoomPoints(): Zoom region set to QPoint(191,129) - QPoint(609,420)
kphotoalbum.Viewer: zoomPixelForPixel(): Zoom region was QPoint(191,129) - QPoint(609,420)
kphotoalbum.Viewer: zoomPixelForPixel(): Zoom region changed to QPoint(191,129) - QPoint(609,420)
kphotoalbum.Viewer: cropAndScale(): using cropped image QPoint(191,129) - QPoint(609,420)
kphotoalbum.Viewer: cropAndScale(): scaling image to 418 x 291
kphotoalbum.Viewer: zoomFull()
kphotoalbum.Viewer: zoom(0,0, 800,549)
kphotoalbum.Viewer: cropAndScale(): using cropped image QPoint(0,-4) - QPoint(800,553)
kphotoalbum.Viewer: cropAndScale(): scaling image to 418 x 291


More information about the Kphotoalbum mailing list