Writing animated gifs using Wand and ImageMagick

It's hard for me to figure out how to write a basic sequence of animated gifs using the ImageMagick Wand binding.

Basic to convert ImageMagick commands that I want to play in python:

convert -delay 50 -size 500x500 xc:SkyBlue \ -page +5+10 /test/wizard.gif \ -page +62+50 test/wizard2.gif \ -loop 0 animation.gif 
+4
source share
1 answer

I was able to figure this out by simply passing commands to the terminal via os.system ():

 build = '''convert -delay 30 -size 500x500 \ -page +0+0 /Users/jkeilson/desktop/photobooth/flower.jpg \ -page +0+0 /Users/jkeilson/desktop/photobooth/wizard2.gif \ -page +0+0 /Users/jkeilson/desktop/photobooth/flower.jpg \ -page +0+0 /Users/jkeilson/desktop/photobooth/wizard2.gif \ -loop 0 animation6.gif''' os.system(build) 
-2
source

Source: https://habr.com/ru/post/1257919/


All Articles