Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I am no expert at animation, but your two animation do not have the same number of frames and I suspect this will be key to overlaying them one-to-one.
You either want to repeat the frames of the outline.gif to fill the same number of frames as in text.gif or choose one frame from the outline.gif and overlay it on each frame of the text.gif
As the outline.gif has 3 frames and the text.gif has 27 frames, they are multiples of each other. So just merge the outline 9 times to match the number of frames
Basically you need to double up and split the times on frames in each animation until the frame by frame timings of the animations match up, (and then animations also have the same number of frames). At that point the -layers composite can be used as descriped previously on the same page to do the overlay, and frame optimization can be used to make the animation smaller.
I had planned to create a simple -layers operation in IM to actually do this time synchronization, but I just never seem to get around to doing more programming in IM core.
Im really needs more people willing to to try and submit complete patches and additions to IM. Once there ability is proven, more direct SVN access to the source can be provided.
One point about mpr: you can things of it as a multi-image save. Rather than just saving a single copy of the 'outline.gif' (and deleting the original) why not use it to copy 3 versions.
You don't even need to delete the original, and you can copy it more times than needed as it is the destination (first) sequence that determine the final number of images.
this overlays 12 repeated copys of the outline (12 x 3 or 36 frames) only the animated text (27 frames) to produce a 27 frame image. This whay you can make your script a bit more forgiving if the number of frames in the text image changes.
the use of mpr: to double, treble the number of frames is ver efficient. you can very quickly make a 1000 image sequence in this way without too many commands.
Cloning images using -clone OR mpr: is also highly memory efficient as the images are not being modified. As such the image data is not being duplicated or copied.