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

Re: segfault in Imager 0.43

From: Peter Leonard (
12355@xyz.molar.is)
Date: Mon 23 Aug 2004 - 15:57:19 GMT

  • Next message: William Kern: "Re: segfault in Imager 0.43"

    As a follow-up:

    Further investigation shows that it's not the scale() call that causes the
    borking. It's the call to $thumb->write().

    Inside write(), it's the call to i_writegif_wiol(), which I can't find
    source for anywhere in Imager. I get the feeling this is part of giflib?

    Any help would be most appreciated.

             thanks,

             Peter

    On Mon, 23 Aug 2004, Peter Leonard wrote:

    >
    > Hello,
    >
    > I'm stuck on a bug that I can't seem to figure out.
    >
    > We use Imager as part of Krang (http://krang.sf.net), to create thumbnails
    > for images as needed.
    >
    > Attached is an image that loads properly in gimp, and gqview, but causes
    > Imager to segfault when attempting to resize it (even when the new
    > dimensions are identical to the old dimensions).
    >
    > This is under Linux (Redhat 7.3 and Redhat 9), libgif 4.10.
    >
    > Below is a code example that throws the segfault - the current X and Y
    > values are identical to the size of the image.
    >
    > Strangely, removing the 'type' argument gets things to work, but the
    > resulting image is not desireable (a 13924x118 gif).
    >
    > Thanks,
    >
    > Pete
    >
    >
    > #!/usr/bin/perl
    >
    > use Imager;
    > use Carp;
    >
    > my $m = $ARGV[0];
    >
    > my $img = Imager->new();
    > $img->open(file=>$m) or croak $img->errstr();
    >
    > my $path = 'output.gif';
    >
    > my $thumb = $img->scale(
    > xpixels => 1,
    > ypixels => 118,
    > type =>'min',
    > qtype =>'preview'
    > );
    > $thumb->write(file=>$path) or croak $thumb->errstr;
    >
    >
    >
    >
    > Attachments:
    > + http://www.molar.is/en/lists/imager-devel/44/b4/12a1087/01.badimage.gif
    >
    >



  •