Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have two animations (.gif files) I want to run side-by-side. Can this be done with ImageMagick?

Moreover, I want to start one of the gifs after thirty frames of the other have passed. Can this be done as well? Otherwise, I can manually insert thirty frames of blackness into one image, but it would be easier to automate this step with ImageMagick, because I will potentially be doing this many times.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

This script does the job :

#!/bin/bash
# $1 : first gif
# $2 : second gif

mkdir first
cd first
convert $1 x%04d.gif
cd ..
mkdir second
cd second
convert $2 x%04d.gif
cd ..

for filename in first/*
do
  filename=`basename $filename`
  montage -tile 2x1 -geometry 512x512 first/$filename second/$filename concat$filename
done
convert concat* output.gif

rm -rf first
rm -rf second
rm concat*
share|improve this answer
    
the montage command is what did it eventually, but I resolved this on my own months ago... –  JeremyKun Nov 1 '12 at 2:35
add comment

convert if provided with more than 1 input image and provided with the -delay option will output animated gif's if the output format is gif.

I used to use this link as my reference guide back in the day: http://www.imagemagick.org/Usage/anim_basics/

share|improve this answer
    
This does not do what I want. Instead, it concatenates the animations. I want it to run the two simultaneously side by side. –  JeremyKun Jun 6 '12 at 18:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.