display — View and Edit Images in an X11 Window

View and lightly edit images in an X Window with ImageMagick's display – a built-in viewer with image info and effects right in the window.

display is ImageMagick's built-in image viewer and opens pictures in their own window on the X Window System. With mouse and keyboard you zoom, rotate or crop images and toggle the image information – no separate GUI application required. Through pipes you can even preview freshly processed images without ever saving them. On ImageMagick 7, prefer invoking the tool as magick display; the classic display command stays compatible.

Basic Usage

display <image> — Open an image in the interactive viewer.

display photo.jpg

display *.jpg — Open multiple images (navigate with Space/Backspace).

display photos/*.jpg

display -resize <width>x<height> <image> — Resize image before displaying.

display -resize 1024x768 large-photo.jpg

display -geometry <width>x<height>+<x>+<y> <image> — Set window size and position.

display -geometry 800x600+100+50 photo.jpg

display -title "<text>" <image> — Set the window title.

display -title "Preview" photo.jpg

Display Options

display -density <dpi> <image> — Set display resolution (DPI).

display -density 150 document.pdf

display -immutable <image> — Open in read-only mode (disable editing features).

display -immutable photo.jpg

display -backdrop -window root <image> — Set image as the desktop wallpaper (X11).

display -backdrop -window root wallpaper.jpg

display -delay <ticks> *.jpg — Display image sequence as slideshow.

display -delay 300 vacation/*.jpg

display -coalesce <animation> — Display animated GIF with reconstructed frames.

display -coalesce animation.gif

display -colorspace Gray <image> — Display in grayscale.

display -colorspace Gray photo.jpg

Keyboard Controls (interactive mode)

Space / Backspace — Next / previous image.

Navigate through multiple opened images

+ / - — Zoom in / zoom out.

Press + to enlarge, - to shrink

< / > — Shrink / enlarge window to half/double size.

Press > to double the display size

o — Restore original image size.

Press o to reset zoom level

i — Toggle image info display.

Press i to show/hide image information

/ — Rotate 90° clockwise.

Press / to rotate the image

s — Save the image.

Press s to save (opens file dialog)

q / Escape — Quit the viewer.

Press q or Escape to close

Pipe & Remote Usage

convert <input> <operations> - | display — Pipe processed image directly to display.

convert photo.jpg -resize 50% -charcoal 2 - | display

curl -s <url> | display — Display an image directly from a URL.

curl -s https://example.com/image.jpg | display

DISPLAY=:0 display <image> — Specify the X display for remote or multi-display setups.

DISPLAY=:0 display photo.jpg

display -remote <image> — Load image into an already running display instance.

display -remote next-photo.jpg

Common Patterns

convert photo.jpg -resize 800x600 -sharpen 0x1 - | display — Preview edits before saving.

convert photo.jpg -resize 800x600 -sharpen 0x1 - | display

montage *.jpg -tile 3x -geometry 200x200+5+5 - | display — Preview a contact sheet without saving to disk.

montage photos/*.jpg -tile 3x -geometry 200x200+5+5 - | display

display -update <seconds> <image> — Auto-refresh display when file changes (useful for watching renders).

display -update 5 output.png

Conclusion

display is ImageMagick's quick way to inspect an image right on screen without a separate application – complete with zoom, rotation, image info and pipe previews of freshly processed files. It does need a running X server, though: locally that's a given, over SSH it only works with X11 forwarding (ssh -X), and not at all on pure headless servers with no display. As a view-only tool it is virtually risk-free – only a deliberate save (s) overwrites files. On ImageMagick 7, magick display is the recommended way to invoke it.

Further Reading

  • animate – plays an image sequence as an animation in an X11 window
  • identify – prints format, dimensions and metadata of image files
  • convert – converts images and applies transformations and effects