# 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.

Source: https://www.jpkc.com/db/en/cheatsheets/images-media/display/

<!-- PROSE:intro -->
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.
<!-- PROSE:intro:end -->

## Basic Usage

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

```bash
display photo.jpg
```

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

```bash
display photos/*.jpg
```

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

```bash
display -resize 1024x768 large-photo.jpg
```

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

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

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

```bash
display -title "Preview" photo.jpg
```

## Display Options

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

```bash
display -density 150 document.pdf
```

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

```bash
display -immutable photo.jpg
```

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

```bash
display -backdrop -window root wallpaper.jpg
```

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

```bash
display -delay 300 vacation/*.jpg
```

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

```bash
display -coalesce animation.gif
```

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

```bash
display -colorspace Gray photo.jpg
```

## Keyboard Controls (interactive mode)

`Space / Backspace` — Next / previous image.

```bash
Navigate through multiple opened images
```

`+ / -` — Zoom in / zoom out.

```bash
Press + to enlarge, - to shrink
```

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

```bash
Press > to double the display size
```

`o` — Restore original image size.

```bash
Press o to reset zoom level
```

`i` — Toggle image info display.

```bash
Press i to show/hide image information
```

`/` — Rotate 90° clockwise.

```bash
Press / to rotate the image
```

`s` — Save the image.

```bash
Press s to save (opens file dialog)
```

`q / Escape` — Quit the viewer.

```bash
Press q or Escape to close
```

## Pipe & Remote Usage

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

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

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

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

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

```bash
DISPLAY=:0 display photo.jpg
```

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

```bash
display -remote next-photo.jpg
```

## Common Patterns

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

```bash
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.

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

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

```bash
display -update 5 output.png
```

<!-- PROSE:outro -->
## 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

- [ImageMagick docs: display](https://imagemagick.org/script/display.php) – official reference for every option and keyboard shortcut
- [ImageMagick docs: Command-line Tools](https://imagemagick.org/script/command-line-tools.php) – overview of every ImageMagick command-line utility
<!-- PROSE:outro:end -->

## Related Commands

- [animate](https://www.jpkc.com/db/en/cheatsheets/images-media/animate/) – plays an image sequence as an animation in an X11 window
- [identify](https://www.jpkc.com/db/en/cheatsheets/images-media/identify/) – prints format, dimensions and metadata of image files
- [convert](https://www.jpkc.com/db/en/cheatsheets/images-media/convert/) – converts images and applies transformations and effects

