[magick-users] Default # of iterations in a animated GIF

Anthony Thyssen anthony at cit.gu.edu.au
Tue Oct 29 10:37:26 PST 2002


Anthony Thyssen on  wrote...
| Tim Hunter on  wrote...
| | I have created a number of animated GIFs using ImageMagick 5.5.1. All of them 
| | loop forever (or for as long as my patience holds out) when displayed using 
| | the animate command. All but one of the animations loop forever when 
| | displayed.in a browser such as Mozilla or Konqueror. That one, however, 
| | created using MorphImages, will only go through its animation one time. I've 
| | tried a number of browsers.
| | 
| | What is the expected behavior? Should animations by default loop forever?
| | 
| | The animation can be produced from 4 input images using this command line:
| | 
| | convert Button_0.gif Button_1.gif Button_2.gif Button_3.gif -delay 12 -morph 8 morph.gif
| | 
| The default is to loop forever unless a special "Application Extension"
| is added to the GIF image.    This extension is NOT standard and was
| originally developed by netscape to control the looping mechnism.
|
Applogies, the GIF extension needs to be added if you wish to loop the
animation.  Default GIF image will only animate once, but with the
extension they can loop 0 (infinite) or however many times desired.

Imagemagic by default adds that extension with as infinite (0) value.
Only if you specify a loop of 1 will the extension not be added.

Example
   convert -delay 20 images*.gif gif:- | wc
         0      97    7817
   convert -loop 1 -delay 20 images*.gif gif:- | wc
         0      97    7798
   convert -loop 100 -delay 20 images*.gif gif:- | wc
         0      97    7817

As you can see the extension adds 19 bytes to the image and is
only not added in the "-loop 1" case.


  Anthony Thyssen ( System Programmer )    http://www.sct.gu.edu.au/~anthony/
 -----------------------------------------------------------------------------
   Branches from the nearby foliage, or geological specimens, may fracture
   my skeletal structure; however, inaccurate descriptions of my physical
   appearance, heritage or personality, cannot damage my psyche.
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.sct.gu.edu.au/~anthony/



More information about the Magick-users mailing list