36.7 Image Animated

20190303

Animated images are a concept that is half way between a static image and a video. Essentially we can create an animation from a series of static images. This is quite popular where the images are a series of camera shots that are taken in quick succession. The results of turning the series of static images into an animated image can be quite impressive.

The GIF format supports animated images, which we usually refer to as animated GIFs. The ImageMagick command convert with the -delay and -loop options works well for creating animated GIFs.

To begin with though, today’s camera images can be quite large. For example, a typical smart phone camera might produce a 4MB image file for a 4032x3024 image. These are generally too large to readily process and so using mogrify with -resize 640 to reduce the image size to 640x480 will be useful.

Here’s an example, being careful not to modify the original images:

$ mkdir TMP
$ cd TMP
$ cp ../20190214_1230*.jpg .
$ mogrify -resize 640 *.jpg
$ convert -delay 30 -loop 0 *.jpg 20190214_1230.gif 
$ eom 20190214_1230.gif
$ cp 20190214_1230.gif ..
$ cd ..
$ rm -rf TMP


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0