[Feature request] toggle lock view
Feature request: toggle lock view
One of the best image viewers available in Windows is IrfanView and it has a feature called lock view, which will lock the zoom level and area of a picture so that next/previous image will automatically zoom to the same area of the image (as opposed to having their zoom levels reset).
This is an incredibly useful feature that makes it a breeze to compare images which are very similar (e.g. pictures that were shot in quick succession, or each have subtle edits) by switching back and forth between the images very quickly (I like to use mousewheel up/down for this). With this feature, one does not need to zoom in on top of the image for each image (which is a pain especially if you need to make quick visual comparisons). Instead, zoom in on just 1 image and then going to next/previous image will retain the zoom area and level until you toggle lock view off.
Another use case is making it much easier to reading the text description on top of images that are video contact sheets. Usually, these thumbnail galleries of a video mean the images can be quite big, thus making the text on top relatively a lot smaller example and a workflow would involve just looking at the top part of each image.
It would also be useful to add an visual indicator somewhere in qimgv (statusbar?) to indicate whether the view is currently locked as you might forget the view is locked and then assume the next image being viewed is the entirety of the image (zoomed to 100% as it is normally).
done
lockZoom and lockView are separate modes (the latter locks zoom and "camera" position)
lockView will only work correctly if the images are same size (which is the use case, so.. whatever)
There are no default shortcuts / buttons (i'll probably put something in the context menu). You can bind it manually for now
Post a comment if you want me to tweak the behavior in some way
https://user-images.githubusercontent.com/5484275/120620799-fd93e080-c465-11eb-9c57-17ff5e9cde3e.mp4
Awesome, did not expect there would be interest to implement this feature.
Having tested it briefly, lockZoom/lockView saves the zoom/position and always restores to this value on other images, so if you want to change it, you would set the new zoom/position on a image and unlock then lock back to this new value. My intuition was it would save the value on the current image and restore it on the next image. In other words, toggling on/off to update the values is not necessary as it would update any new values on the fly. I have a preference toward the latter behavior as it does seem more natural and convenient.
Much appreciated. Already putting it to good use.
lockViewwill only work correctly if the images are same size
Is there a chance to make this feature even better and support images of different size? That would be awesome to compare quality of e.g. different videos with different resolutions.
I guess the way it should work is it should lock not a fixed zoom%/position for all images, but lock and remember zoom%/position for each image for which a function was applied, so that when you switch between them the view you've set up is not changed to one commong %, but rather maintained
For example, if I have an image ten with dimensions 10×10 and image twenty with dimensions 20×20 I can:
- zoom the
tenimage by a factor of4, lock the zoom%/view position (lockViewPerImage) - zoom the
twentyimage by a factor of2, lock the zoom%/view position (lockViewPerImage)
If you want to compare the center of each image, that's it, the views will be identical for all the images you've applied the lockViewPerImage to since the zoom while maintaining the center position. Otherwise you'd have to go back&forth unlocking and adjusting position to have a better match
Currently I'm comparing these by making a few instances of an image viewer and switching between them, but it's slightly less convenient than a switch between two images within one window