I want to use IM to generate gifs dynamically in a website (ASP.NET). The following source seems to create 4 gif files temporary in 4 commands and use a 5th command to merge them. I am afraid that this approach could fail when multiple users generate gifs at the same time so IM could get mixed up with the temporary files. And my tests shows that this problem occurs.
Here is the code (source: http://www.ioncannon.net/linux/81/5-ima ... es-part-1/):
Code: Select all
convert flower.jpg -resize 100×100 -font courier -fill white -pointsize 20 -annotate +50+50 'Frame 1' flower_frame1.gif
convert flower.jpg -resize 100×100 -font courier -fill white -pointsize 20 -annotate +50+50 'Frame 2' flower_frame2.gif
convert flower.jpg -resize 100×100 -font courier -fill white -pointsize 20 -annotate +50+50 'Frame 3' flower_frame3.gif
convert flower.jpg -resize 100×100 -font courier -fill white -pointsize 20 -annotate +50+50 'Frame 4' flower_frame4.gif
convert -delay 100 -size 100×100 \
-page +0+0 flower_frame1.gif \
-page +0+0 flower_frame2.gif \
-page +0+0 flower_frame3.gif \
-page +0+0 flower_frame4.gif \
-loop 0 flower_animation.gif
Thanks,
ravel