Is their some reason you want an actual 'overlay' animation? (no transparency in any GIF frame?)
Note that if you do not mind transparency being used in the overlay images, For example something like the bunny animation produces in Transparency Optimization
then the layers Optimize method can be used, as a general purpose optimizer. Their is just no guarantee that you will get a 'Overlay Animation'.
You may actually get a 'mixed disposal animation' as IM GIF optimization function thinks the result will be smaller (less pixels changed between each frame update). Note that that does not mean it is less pixels overall, or in fact a smaller file size, as that requires recursive optimization that could take a VERY long time!
I know it's kind of a lofty goal, but if there's another method that gives me the effect of a static background underneath frames, no jitter/animated in the background's dither between frames, is fast-ish to run and gives a fairly small file size, I'd love to hear it!!
I don't neccessarily need transparency in the final GIF since each frame will have the background under them. I just saw this:
This is good enough for most purposes. For example by using the 'Dst_Over' composition method you could also place an image 'under' the animation as a static background.
From: http://www.imagemagick.org/Usage/anim_m ... mpose_draw
which sounds good to me! So is it easy to run this command:
Code: Select all
convert script_k.gif -repage 100x100+20+20\! -coalesce \
-draw 'image DstOver 0,0 0,0 "granite:"' \
-layers Optimize script_k_granite.gif
in the MagickWand API?
I noticed this operates on a previously created GIF - "script_k.gif" - is there any way to do it all in one MagickWand session? (eg: create the GIF and
at the same time overlay the frames on a background)
Will it also have the weird 0-delay extra frame that I have to remove?
I *also* experimented with using:
Code: Select all
but I found that a) there was still some animated dither between frames in some areas, and b) I like the look of the "regular" dithered image instead of the posterized dither.
Thank you so much for the help.