Created
January 26, 2018 16:04
-
-
Save sven-bock/cdb6cbcee5eed945d68c26d3a3ab1ac1 to your computer and use it in GitHub Desktop.
Convert, animate images in command line using function from image magick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Convert the format of one image | |
convert source.pgm target.png | |
#Convert all images format of one type into another | |
# e.g. png is the target format | |
# e.g. all pgm images starting with "source" are converted | |
mogrify -format png source*.pgm | |
#Convert multiple images to one animated image | |
# e.g. takes all pgm images in the folder to create one animated gif. Verify that the images are numbered in ascending order. | |
# e.g. sample01.pgm, sample02.pgm, .... (not: sample9.pgm, sample10.pgm) | |
convert -delay 120 -loop 0 *.pgm animated.gif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment