Page 1 of 1

Batch Animate

Posted: 2012-11-29T18:21:12-07:00
by jmphoto
Hi guys,

I've done a fair bit of research, but haven't found anything that answers my specific query, so here goes with my first post.

Is it possible to harness the power of IM to do a batch animation. Specifically I want to create an animated GIF photobooth, but am trying to get my head around the 'how'.

My thoughts would be that the booth would take 4 frames, named sequentially. Starts with IMG001, IMG002, IMG003 and IMG004. Then there would be a break of at least 30 seconds or so before the next round of photos would be taken, presumably would then be IMG005, IMG006, IMG007 and IMG008, but in theory could be named IMG001, IMG002, IMG003 and IMG004 again after moving the original files.

If it isn't possible to animate the 4 frames as they drop into the folder from the camera, would it be possible to write a command that I could run that could separate [IMG001, IMG002, IMG003, IMG004] as one animaton and then [IMG005, IMG006, IMG007, IMG008] and so on?

It is probably clear as mud, and I apologise. Hope this is posted in the correct place.

Re: Batch Animate

Posted: 2012-11-29T19:31:54-07:00
by fmw42
It should be possible to do most if not all you want, if I understand correctly. But you may have to build a script to watch the folder. So what version of IM do you have and what platform? Syntax and scripting is different between unix(linux,mac) and windows.

See
http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_opt/
http://www.imagemagick.org/Usage/anim_mods/
http://www.imagemagick.org/script/animate.php

basic animation command

convert -dispose xxx -delay yyy image1 image2 image3 image4 -loop 0 result.gif

or if your folder only has the images that you want in it and no others (all previous ones deleted), then

convert -dispose xxx -delay yyy image* -loop 0 result.gif


The issue that is outside of IM where the scripting comes in is to watch the folder and take action at appropriate times.