Page 1 of 1
					
				decomposing an animated gif
				Posted: 2011-12-21T08:42:50-07:00
				by leyn
				Hello,
I have an animated gif.
2 questions:
1) how do I extract the composing images out of that animated gif?
2) how do I ask up the number of images, and the display time of
    each composing image and/or the total time?
Best regards,
Francky
			 
			
					
				Re: decomposing an animated gif
				Posted: 2011-12-21T10:16:22-07:00
				by fmw42
				You can only get the frames and not the composing image if there are more than one image in a frame.
try
convert animation.gif +adjoin animation_%d.gif
+adjoin is not needed if the image type does not support multi-frames.  So gif and tif need it, but png and jpg do not.
http://www.imagemagick.org/script/comma ... php#adjoin
To get information about each frame
identify -verbose animation.gif
 
			 
			
					
				Re: decomposing an animated gif
				Posted: 2011-12-21T18:15:55-07:00
				by anthony
				For details of methods to extract information from GIF animations see
IM examples, Animation Basics, Studying Animations
  
http://www.imagemagick.org/Usage/anim_basics/#study
There are a lot of 'percent' formatting escapes that can be used to extract exactly the information you want from an identify.  Also given are some scripts that can 'decompose' the animation to separate frame images, plus a 'script' that can be used to put those frames back together again!
I use those scripts later in Animation Modifications, such as Appending Side-by-Side
  
http://www.imagemagick.org/Usage/anim_mods/#append