(none) imager-devel
/ help / lists / applications / search /
 

Re: GIF file size.

From: Tony Cook (
15311@xyz.molar.is)
Date: Wed 23 Nov 2005 - 22:28:53 GMT

  • Next message: Tony Cook: "Re: GIF file size."

    On Wed, Nov 23, 2005 at 01:37:53PM -0500, vsalik wrote:
    > Hi,
    >
    > I've been running a very simple test script:
    >
    > my $img = Imager->new();
    > $img->read(file=>$in_name, type=>'gif')
    > or die "Cannot load $in_name: ", $img->errstr, "\n";
    >
    > $img->write(file=>$out_name, type=>'gif')
    > # or die "Cannot write $out_name: ", $img->errstr, "\n";
    >
    > The size of $in_name is a little bit more than 1K, but the size of
    > $out_name is about 30K!!!
    >
    > Why? What am I doing wrong?

    As Slaven says, you're producing uncompressed GIFs.

    You need to install giflib instead of libungif.

    If your OS (or distribution) doesn't provide a giflib package then you
    can get source from:

    http://sourceforge.net/project/showfiles.php?group_id=102202

    Debian provides a giflib3 package, which works for most purposes (you
    can't write/read to/from scalars or via callbacks.)

    Tony



  •