# animate — Display Image Sequences as Animation

> Practical guide to animate from ImageMagick: play animated GIFs and image sequences in an X11 window, control frames and create quick previews.

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

<!-- PROSE:intro -->
animate is ImageMagick's playback tool that displays a sequence of images or a ready-made animation in its own X11 window. Reach for it to quickly review animated GIFs, rendered frame sequences or time-lapses before you process them further. Note that animate needs a running X server and does not work headless. Under ImageMagick 7 you invoke it preferably as `magick animate`; the classic `animate` call stays compatible.
<!-- PROSE:intro:end -->

## Basic Usage

`animate <animation>` — Display an animated GIF or multi-frame image.

```bash
animate animation.gif
```

`animate <frame1> <frame2> <frame3> ...` — Animate a sequence of image files.

```bash
animate frame-001.png frame-002.png frame-003.png
```

`animate *.png` — Animate all PNG files in alphabetical order.

```bash
animate frames/*.png
```

`animate -delay <ticks> *.png` — Set delay between frames (in 1/100 second).

```bash
animate -delay 10 frames/*.png
```

## Playback Control

`animate -loop <n> <animation>` — Set number of loops (0 = infinite).

```bash
animate -loop 3 animation.gif
```

`animate -delay <ticks> <animation>` — Override frame delay (speed up or slow down).

```bash
animate -delay 5 animation.gif
```

`animate -delay <ticks>x<tps> <animation>` — Set delay with custom ticks-per-second base.

```bash
animate -delay 1x30 frames/*.png
```

`animate -pause <seconds> <animation>` — Pause for specified seconds between loops.

```bash
animate -pause 2 animation.gif
```

## Display Options

`animate -resize <width>x<height> <animation>` — Resize animation for display.

```bash
animate -resize 640x480 animation.gif
```

`animate -coalesce <animation>` — Reconstruct frames before displaying (fix optimized GIFs).

```bash
animate -coalesce animation.gif
```

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

```bash
animate -geometry 800x600+100+50 animation.gif
```

`animate -title "<text>" <animation>` — Set the window title.

```bash
animate -title "Preview" animation.gif
```

`animate -backdrop <animation>` — Display with a backdrop covering the full screen.

```bash
animate -backdrop animation.gif
```

## Keyboard Controls (during playback)

`Space` — Toggle play/pause.

```bash
Press Space to pause or resume playback
```

`. (period)` — Step forward one frame.

```bash
Press . to advance frame by frame
```

`< / >` — Slow down / speed up playback.

```bash
Press > to increase playback speed
```

`q / Escape` — Quit the animation viewer.

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

`F1` — Open the built-in help menu.

```bash
Press F1 for keyboard shortcuts reference
```

## Common Patterns

`convert -delay 20 frames/*.png animation.gif && animate animation.gif` — Create an animation from frames and immediately preview it.

```bash
convert -delay 20 render-*.png preview.gif && animate preview.gif
```

`animate -delay 50 -loop 0 -resize 50% *.png` — Preview frames at half size with slow playback.

```bash
animate -delay 50 -loop 0 -resize 50% timelapse-*.png
```

`animate -coalesce -delay 10 animation.gif` — Fix and speed up an optimized GIF for preview.

```bash
animate -coalesce -delay 10 animation.gif
```

<!-- PROSE:outro -->
## Conclusion

animate is a pure preview tool with no destructive risk: it shows your image sequences but never alters files. For everyday use `-delay`, `-loop`, `-resize` and `-coalesce` are usually all you need, the last one playing optimized GIFs back cleanly. Keep in mind that animate opens a graphical X11 window – on a headless server without a display it simply does nothing; there you are better off using `convert`/`magick` for processing or copying the file to a workstation. Under ImageMagick 7, `magick animate` is the recommended invocation.

## Further Reading

- [ImageMagick: animate](https://imagemagick.org/script/animate.php) – official reference for animate and all its options
- [ImageMagick: Command-line Tools](https://imagemagick.org/script/command-line-tools.php) – overview of all ImageMagick command-line utilities
<!-- PROSE:outro:end -->

## Related Commands

- [display](https://www.jpkc.com/db/en/cheatsheets/images-media/display/) – view and interactively inspect single images in an X11 window
- [convert](https://www.jpkc.com/db/en/cheatsheets/images-media/convert/) – convert, resize and build animations from image frames
- [montage](https://www.jpkc.com/db/en/cheatsheets/images-media/montage/) – combine multiple images into a contact-sheet overview

