Make gif from images (Linux)

  • Gif

One tool to help with the task is the ImageMagick.

If it is not already installed on a terminal use the following:

To convert a series of images to gif use the following command

or if the folder contains only the png needed in the animation:

The resize option will shrink the gif so it can take up less space.

The delay controls the animation speed. Larger values result in slower animation

If the figures have leading zeros and their range is variable then the series of images can be supplied as:

In this example the images have the format commands frame0000.png, frame0001.png, etc…

As with all Linux commands  convert --help will show all the available options.

  • Movies

The process to make video is also very similar. There is a tool ffmpeg that can be install using:

An example to convert a series of images into an mp4 movie is the following:

I’ll spare the details as there is already a detail description in this link.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.