In this guide, you will learn how to make GIF in Linux with one simple command.
Have you ever wondered how to create a GIF animation? In Linux, you can do it with one simple command. In the article, I will show you how to make GIF in Linux.
You can watch the video tutorial or continue reading below.
GIF is the Graphics Interchange Format. Basically, it is a very simple animation file. If you have read my posts on how to how to make Xfce look modern and beautiful, you have already seen this GIF with app icons.
I created it from these three images.
I will use them in this tutorial. But you can also extract images from a video and use them to create a GIF from a video.
To make GIF in Linux, you need to install ImageMagick. If you use any Debian based distro like Linux Mint, Ubuntu or elementary OS, run this command:
sudo apt-get install imagemagick
If you use any other distro, find this app in your package manager. After that, place all the images you want to create a GIF from in one folder. I put these images in the gif-icons folder.
Make GIF in Linux
In the directory with images, click the right mouse button and open the Terminal. Then, run the command:
convert -delay 100 -loop 0 *.jpeg animatedGIF.gif
delay specifies the time in milliseconds how fast the animation will change a frame, and
loop indicates how many loops to run. When you choose 0, it will run infinitely.
When the command is executed, you get the GIF file in that directory.
I advise to leave the default meaning of
loop, as in this case the animation will replay infinitely. At the same time, you can change the
delay value. The larger the value, the slower the animation will be.
For the better quality, make sure that all your images are of the same size and resolution. It is also a good idea to compress the images as much as possible.
It is really easy to make GIF in Linux. All you need is to run one command in the terminal. However, if you prefer graphical interface, you can make GIFs in GIMP.
Do you know any other way to an animated GIF in Linux?