Construction of an algorithm for animating images.

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
josandss
Posts: 2
Joined: 2012-04-17T13:43:28-07:00
Authentication code: 13

Construction of an algorithm for animating images.

Post 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é
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Construction of an algorithm for animating images.

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Construction of an algorithm for animating images.

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply