Tool to convert a sequence of numbered PNG files to an animated GIF?
I've created a series of small PNG files using Blender and I was wondering if there was a tool (preferably in the repos.) that would convert them to an animated GIF.
One extra stipulation: the tool needs to also be able to set the background color of the GIF to a specified color since the PNG files have an alpha channel and I don't want the GIF to be transparent.
Yes, using imagemagick
s convert
tool:
convert -delay 20 -loop 0 frame*.png animated.gif
This will take all of the source frames and will make them into one animated GIF image. The -delay 20 argument will cause a 20 hundredths of a second delay between each frame, and the -loop 0 will cause the gif to loop over and over again.
As for setting the background color for the gif, that can be done with the background
and flatten
flags:
convert -delay 20 -loop 0 frame*.png -background white -flatten animated.gif