InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

ImageMagick tutorials

  • Install Imagemagick on Mac
  • Install Imagemagick on Ubuntu
  • Create animated gif using Mac preview
  • Create animated gif on command line
  • Edit animated gif speed
  • Find image width and ppi
  • Find image unique colors and bit depth
  • Resize image dimention
  • Compress images
  • Crop image
 
  • Home
  • > Tutorials
  • > Linux/Unix Command Line
  • > ImageMagick

Imagemagick – how to create animation on command line

By admin on Dec 11, 2015

Imagemagick is very powerful tool to process images on command line. If you have multiple images, you can use imagemagick convert utility on Mac or Linux to create animation (animated gif). Here are steps to create animation using imagemagick.

Create multiple png images for animation

We will use 4 images to create animation. These 4 images are created by taking window screenshot on Terminal shell while typing “Hello Animation World”.

  1. img1.png
    imagemagick-animation-img1
  2. img2.png
    imagemagick-animation-img2
  3. img3.png
    imagemagick-animation-img3
  4. img4.png
    imagemagick-animation-img4

Animation with same delay 100 and infinite loop

delay 100 is equivalent of 100/100=1 fps (frames per second).

$ convert -delay 100 -loop 0 img1.png img2.png img3.png img4.png animation1.gif

Here is the outcome animation gif image. Notice the equal delay after each frame in animation.
imagemagick-animation1

Animation with more delay after last image and infinite loop

We can repeat -delay param to change it for last image.

$ convert -delay 100 -loop 0 img1.png img2.png img3.png -delay 500 img4.png animation2.gif

Here is the outcome animation gif image. Notice the higher delay after last (4th) frame in animation.
imagemagick-animation2

Suggested posts:

  1. Get image width and ppi using imagemagick identify on command line
  2. How to check if a user has password on Linux
  3. How to create animated gif using Mac preview
  4. Mac brew – how to relink installed binaries for a package
  5. How to install node.js on Ubuntu Linux
  6. Php look ahead and look behind regex examples
  7. Find used ports by an app on Android using Adb
  8. Mysql find current timezone offset
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged ImageMagick, Linux, Linux/Unix Command Line, Mac, Tutorials, Ubuntu Linux
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress