The -display command (may be shortened to -d) furnishes two important assets. It puts a visualization of the image pipeline within an on-screen interactive viewer. When the command is unadorned on the right hand side, each image in the pipeline appears as thumbnails, and it prints statistical information of each image in the command shell. One may place any number of display commands on the command line; G'MIC will suspend processing at that point and display the various images currently inhabiting the image stack. Mouse-clicking on an image thumbnail selects it for closer examination. G'MIC hides the other images and expands the size of the selected image. The mouse reads out channel intensity values of the pixel it is resting upon, along with pixel coordinates.

Display of pixel intensities

The format of the -display command is:

-display (+): _X,_Y,_Z

Optional parameters, 'X','Y','Z', support 3D volumetric images, that is, images with two or more planes or slices comprising the depth (z) dimension (see Images). X, Y, and Z pick the location of one corner of the viewing volume.

Basic Interactions

Without any righthand decorations, Display places a representation of the current image stack on the screen. Decorate the righthand side of the command with a selection to limit the number of images. For example, -display[-1] will only show the last image in the stack.  Examine a particular image by clicking on it with the left mouse button; other images go away and the selected image becomes larger. Magnify portions of the selected image by a left-mouse-down, drag, left-mouse-up action; you will draw out a rectangle that, on mouse-up, expands to fill the entire window. Step out by single-clicking with the left mouse button without dragging out a rectangle. Exit the display command by pressing the 'ESC' key.

A number of control key combinations furnish additional services:

  1. CTRL+D: Increase window size.
  2. CTRL+C: Decrease window size.
  3. CTRL+R: Reset window size.
  4. CTRL+F: Toggle fullscreen mode.
  5. CTRL+S: Save current window snapshot as numbered file ’gmic xxxx.bmp’.
  6. CTRL+O: Save current instance of the viewed data, as numbered file ’gmic xxxx.cimgz’.


The -display command implicitly normalizes images, a convenience that sows no end of confusion among new (and experienced) G'MIC users, because the -output command does not concomitantly normalize images when it saves it to file – nor should it, if data integrity has any meaning at all. Not a few G'MIC users, having seen the Perfect Image during a -display session, invoke -output without further concern, discovering far too late in the game that the dynamic range of the image is incompatible with the image file, or is beyond the ken of downstream image editors. The primer on Images as Datasets explores the issue in detail; it suffices here to note that -display is not really a What-You-See-Is-What-You-Get command. It's workalike variant, -display0, operates like this command in all but one respect: it does not normalize pipeline images.

Viewing Volumes

For volumetric data — images with depths of more than one slice — G'MIC's -display divides into quadrants. The upper left quadrant shows the plan view (X, Y), the upper right  shows the (Y, Z) elevation view and the lower left shows the (X, Z) elevation view. New control keys become available:

  1. CTRL+A: Toggles the visibility of selection crosshairs.
  2. CTRL+P: Supresses the two elevation views and progesses depthwise through the image; the plan view shows an animation of the progression. Pressing CTRL+P again stops the animation and restores the two elevation views.  
  3. CTRL+V: Toggles on (or off) a thumbnail of the plan view in the lower right quadrant.
  4. CTRL+Mousewheel: Zooms in (or out) along the depth axis
  5. SHIFT+Mousewheel: Pans left (or right) along the width axis
  6. ALT+Mousewheel: Pans up (or down) along the height axis

The mouse will select viewing volumes in a manner similar to flat images. Left mouse button down in the plan or either elevation, then sweep out a rectangle to specify two of the three dimensions, Then release the left mouse button and  move the cursor  to another view to sweep out the last dimension. Left mouse down again then sets the new viewing volume. (Example: Mouse down in the (X, Z) elevation to set width and depth, Release and move to the plan view to set Y).

Garry Osgood