I have 2 GIFs that are the same length.
I want to put the GIFs beside each other to have 1 GIF with both playing at the same time. I have tried to use the convert
tool with:
convert +append 1.gif1 2.gif output.gif
However, this seems to blend all the images together and changes the size to be extremely small.
I was thinking that I could append each image together and then create a GIF out of those already combined images. However it did not work when I tried:
convert -delay 15 -loop 0 1*.png 2*.png +append output.gif
I have a lot of images with long names and I do not want to have to go through individually and append each figure with new naming conventions.
I don't have 2 animated GIFs of the same length, so I'll just use two copies of this one:
Let's look at the frames in there, with this:
Mmmm, 18 frames with different sizes, that means we need to use
-coalesce
to rebuild partial frames into full ones.Let's copy that and make
2.gif
Now we can split the two gifs into their component frames, like this:
Now let's join the individual frames side-by-side:
Note that
${f/a/b}
is a bash-ism meaning "take the value of f and replace the letter 'a' with 'b'".And put them back together again:
That looks longer, and harder, than it is because I tried to explain it all, but it looks like this really:
Note that this conceptual code, not production quality. It doesn't remove the temporary files it creates, nor does it carry the inter-frame time forward from the original GIFs. If you want to get the original frame rate you could get them like this and save them into an array and feed the delays back into the re-animation command at the end:
Also, you may want a spacer between the two animations, say 10 pixels, which you can do by replacing the
convert
command inside thefor
loop with this one: