Page 1 of 1

Connect gif-animation, and JPG/PNG

Posted: 2012-12-28T17:08:45-07:00
by sisoev
Hi!
There was a challenge to combine gif-animation and static image JPG or PNG (Impose hyphae-animated background).
I do so:

convert 2.gif -coalesce -set dispose previous 2_tmp.gif - get rid of the artifacts
convert 2_tmp.gif +adjoin tmp/gifs.png - split gif into frames
* further processes each frame separately *
convert -loop 0 tmp/*.png result.gif - collect in animation

But unfortunately the speed is very slow, there may be a simpler solution?
Thank you!

Re: Connect gif-animation, and JPG/PNG

Posted: 2012-12-28T17:52:53-07:00
by fmw42
Creating gifs in IM takes a long time as IM uses a very precise algorithm. To speed it up, you can set -treedepth to 3 or 4 ( I think it is nominally 8 ).


You should be able to combine your first two lines as

convert 2.gif -coalesce -set dispose previous +adjoin tmp/gifs.png

That should avoid creating new gifs until the end.