Page 1 of 1

Construction of an algorithm for animating images.

Posted: 2012-04-17T14:40:01-07:00
by josandss
Good afternoon, friend,

I do not know if you could give me a light. I have a directory that is always taking pictures such as:

CP001_Rate_50km_1_1940.jpg
CP001_Rate_50km_1_1944.jpg

CP001_Rate_100km_1_1940.jpg
CP001_Rate_100km_1_1944.jpg

CP001_Rate_200km_1_1940.jpg
CP001_Rate_200km_1_1944.jpg

where CP001 - is a code;
Rate - is the product
xxKM - the type of image scale
1 - the system code
_1940 Or _1944 - is the time that the image was generated.

How could I create a script that could be checking for new images in the directory and turn them into animations with 10 frames (adding the latest and deleting the first animation) and end with a name like: rate50km.jpg; rate100km . jpg; rate200km.jpg.

hope I'm not asking too much...

Have a great day for all

André

Re: Construction of an algorithm for animating images.

Posted: 2012-04-17T15:16:36-07:00
by fmw42
IM will not check any directory for new activity. You will have to use some other method such as checking periodically via some kind of thing like cron. As for naming, one can write a script to loop over images in a directory and then use unix to parse the name into its components and use those variables to create the output image name.

Re: Construction of an algorithm for animating images.

Posted: 2012-04-17T18:13:23-07:00
by anthony
As fred said, this is just working out the filenames needed for a specific animation.

This really has nothing to do with ImageMagick at all. It is purely a scripting problem.