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

segfault in Imager 0.43

From: Peter Leonard (
Date: Mon 23 Aug 2004 - 15:41:39 GMT

  • Next message: Peter Leonard: "Re: segfault in Imager 0.43"


    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).




    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;

     + http://www.molar.is/en/lists/imager-devel/44/b4/12a1087/01.badimage.gif