Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of tonyc (123)

Tuesday June 26, 2001
07:36 AM

reading animated GIFs

[ #336 ]

I finally got it all going, but it's been a slow weekend.

Now Imager can read images from a GIF file as separate images, with the palette for each image, since Imager now has indexed images. The new read_multi() function sets tags on each image, including transparency and animation information.

  • my @imgs = Imager->read_multi(file=>$filename);
    for my $img (@imgs) {
      my $delay;
      print "Delay $delay\n"
        if defined($delay = $img->tags(name=>'gif_delay'));

Now I just need to find the tuits to make the writegif_gen() code understand paletted images.