animated-gif -> multiple files

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
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: animated-gif -> multiple files

Post by el_supremo »

Code: Select all

convert your.gif +adjoin split_%02d.gif
This will number them split_01.gif, split_02.gif, etc.
If you know that there are at least 100 frames, use %03d for a three digit number.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: animated-gif -> multiple files

Post by anthony »

See IM Examples, and specifically the gif2anim script
http://www.imagemagick.org/Usage/anim_basics/#sequence
That script not only separates the animation into individual frame images (coalesced or otherwise) but also generates a ".anim" file containing all the animation meta-data (disposals, positions, time delays, etc) needed to re-created the original animation from those individual frames.

Another script "anim2gif" reverses the process, simply by stripling comments, a small amount of text replacement and passing the options to a "convert" command.

You could say it is a 'prelude' to what I imagine IM v7 convert scripts would look like, and yet I originally created that script for IM version 4!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply