Dynamically naming converted gif frames

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dv2700
Posts: 1
Joined: 2012-09-22T17:14:04-07:00
Authentication code: 67789

Dynamically naming converted gif frames

Post by dv2700 »

I did a cursory search to try to obtain a solution to my problem, and I have a few attempts at the issue if I need to gather and post them.

I'm trying to rename the individual .jpgs of a converted gif ["convert earth.gif earth.jpg"] and add into the new filenames the tickcount of following each frame. I was able to get the tickcounts via

Code: Select all

identify  -format %T earth.gif
but I'm unsure how to couple this with the conversion directly, outside of scripting after both commands are completed separately. My endgoal is to use the saved files for further scripting with Autohotkey, and it would be excessively easy to just read the tickcount out of the filename itself (e.g. earth0.jpg_10, earth1.jpg_10, etc)

I apologize if this is a question that's already been answered or documented (and probably much more politely). Point me in the direction and gimme a kick!
Thanks :)
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Dynamically naming converted gif frames

Post by anthony »

Code: Select all

convert image.gif   image_%03.jpg
this will add a 3 digit number for each frame found in the GIF file.

See Image File Handling, Adjoining.
http://www.imagemagick.org/Usage/files/#adjoin
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply