~~David~~ has asked for the wisdom of the Perl Monks concerning the following question:

All, I am making an animated GIF, and want to be better able to control the speed at which it loops. Is there a setting somewhere that can accomplish this? Or do I have to make a 4 file loop with the first 2 and last 2 images being the same to slow down the apparent blink rate?
sub makeGIF { my $desktop = "C:\\Documents and Settings\\$ENV{LNAME}\\Desktop\\" +; my($blinker); $blinker = new Image::Magick; $blinker->Read("TempImages\\defective.bmp"); $blinker->Read("TempImages\\reference.bmp"); $blinker->Write("$desktop\\blink.gif"); }

Replies are listed 'Best First'.
Re: Image::Magick GIF Animation Speed
by Sixtease (Friar) on Nov 23, 2007 at 20:34 UTC
    $blinker->Write(delay => $hundredths_of_second, filename => "$desktop\\blink.gif");

    I read in the tutorials that I encountered googling this up, that another option loop => 0 may be needed if you want the image to keep animating over and over. But as far as I tested it, the option doesn't make any difference.

      That works perfectly. I didn't need to add the loop option to make it repeat. Thanks, David