Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Image::Magick GIF Animation Speed

by ~~David~~ (Hermit)
on Nov 23, 2007 at 19:25 UTC ( #652638=perlquestion: print w/ replies, xml ) Need Help??
~~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"); }
~~David~~

Comment on Image::Magick GIF Animation Speed
Download Code
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
      ~~David~~

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://652638]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-09-23 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls