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 imagemagicks 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

According to this StackOverflow Question you can use ImageMagick or a Python script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.