I've rewritten the gif output support for Imager.

The new gif support is now in Imager. This page is now kept only for historical reasons.

I have a dump of my build tree. This includes the new gif write code, a minor transform2 optimization, and callback support for reading gifs. The t10formats.t test takes a long time to run - this will probably move elsewhere. There is redundant code in the package too. You need to do a make clean and perl Makefile.PL before building it.

I'm adding support for most of the functionality supported by GIFs including animation and transparency.

    # animated gif
    my @imgs;
    for my $i (0..9) {
      my $im = Imager::ImgRaw::new(200, 200, 3);
      i_box_filled($im, 0, 0, 199, $i * 20, $green);
      i_box_filled($im, 0, $i*20, 199, 199, $blue);
      push(@imgs, $im);
    my @gif_delays = (50) x 10;
    open FH, ">testout/t10_anim.gif" or die $!;
    binmode FH;
    i_writegif_gen(fileno(FH), { make_colors=>'webmap',
				 gif_delays=>\@gif_delays }, @imgs)
      or die "Cannot write anim gif";
    close FH;