I’ve made some progress on command display2d:
-
Added ‘notifications’ to show what is happening when pressing a combination of keys.
-
So far, recognized key combinations are:
- CTRL + A : Enable/Disable Alpha mode. (default: off)
Alpha mode enabled allows to view the transparency for GREYA or RGBA input images. - CTRL + Z: Enable/Disable Preservation of Aspect Ratio (default:on)
This mode influences the way the image is displayed when the display window is resized. The aspect ratio of the input image can be preserved, or not. - CTRL + N: Enable/Disable Value Normalization (default:on).
Three normalization modes are available : disabled, enabled or channel by channel. Normalization is not applied on the alpha channel when Alpha mode is enabled. - CTRL + O: Save a copy of the input image, as a numbered
.gmzfile. - CTRL + S: Save a copy of the current view, as a numbered
.pngfile (aka screenshot). - CTRL + SPACE: Re-center and resize image to fit display window.
- CTRL + R: Reset view and window size.
- CTRL + D: Increase window size.
- CTRL + C: Decrease window size.
- CTRL + A : Enable/Disable Alpha mode. (default: off)
To move and zoom image in/out, the following ways are supported:
- Mouse wheel or PAD+,PAD- : Zoom in/out.
- Middle mouse button or CTRL + Left mouse button : Move image.
- Arrow keys : Move image.
As I said before, the code of this command is intended to be re-used afterwards in other interactive commands, as a solid basis to start with, allowing an easy navigation in the image content, with a common set of key shortcuts. I’ll try then to make it as clean as possible.
So, do not hesitate to test and give feedback!
Multiple image views can be done with a combination of display2d and parallel, just like this:
$ gmic sample duck,car parallel d2d[0],d2d[1]