Home Linux How to Convert JPG Images to an Animated GIF in Linux With...

How to Convert JPG Images to an Animated GIF in Linux With Command Line

In the lately days, social media timeline is flooded by countless animated GIFs. In Twitter, there is even a feature to enable you explore animated GIFs and share them with your followers.

While most animated GIFs contain a funny thing, you can also use an animated GIF to demonstrate something like a specific feature of an application or a short how to. If you are a Linux user and thinking of converting some JPG images to a single animated GIF, you can do it easily via terminal

But, before getting started, you should have ImageMagick installed on your system. The tool contains a command line to enable you convert JPGs to an animated GIF

This article will show how you to convert JPG images to an animated GIF on Ubuntu 16.04. By default, ImageMagick has installed in Ubuntu 16.04 so you don’t need to install it anymore. If you are not an Ubuntu user, you can get ImageMagick here

  • Gather all your JPG images in a single directory
  • Open your terminal and go the directory where your JPG imagess 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 640x480 *.jpg
  • Finally, type the following comand to convert your JPG images to a single animated GIF
$convert -delay 20 -loop 0 *.jpg example.gif

LEAVE A REPLY

Please enter your comment!
Please enter your name here

MOST-READ THIS WEEK