In the recent times, all the social media platforms are flooded with countless animated GIFs. In Twitter, we even have a feature to explore the animated GIFs and share them with our followers.
Not all GIFs are about comedy, some are aimed at teaching a simple how-to or a simple trick. If you are a Linux user and thinking how to convert a JPG image to an animated GIF, you can do this easily using the terminal.
Before we proceed further, you need to install ImageMagick installed on your system. This tool has a command line that enables you to convert JPG images to an animated GIF
In this article, we will show how you can to convert JPG images to an animated GIF on Ubuntu 16.10. By default, ImageMagick has installed in Ubuntu 16.10 so we don’t have to face the trouble of installing it anymore. If you are not an Ubuntu user, you can get ImageMagick here
- Gather all your JPG images into a single directory
- Open up your terminal and go the directory where your JPG images are located and resize them to a smaller size. In this case, I resized my JPG images to 640×480. Type the command below to resize your JPG images in a single step
$mogrify -resize 640×480 *.jpg
- Finally, type command below to convert your JPG images to a single animated GIF
$convert -delay 20 -loop 0 *.jpg example.gif