-
Gif
One tool to help with the task is the ImageMagick.
If it is not already installed on a terminal use the following:
1 |
sudo apt-get install imagemagick |
To convert a series of images to gif use the following command
1 |
convert -resize 60% -delay 50 -loop 0 TuleAnim.000{0..7}.png TuleAnim.gif |
or if the folder contains only the png needed in the animation:
1 |
convert -resize 80% -delay 30 -loop 0 *.png TuleAnim.gif |
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:
1 |
'frame%04d.png[0-10]' |
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:
1 |
sudo apt install ffmpeg |
An example to convert a series of images into an mp4 movie is the following:
1 |
ffmpeg -framerate 6 -i WT_DP_2nd_pass.%04d.png -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4 |
I’ll spare the details as there is already a detail description in this link.
–