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

Re: segfault in Imager 0.43

From: Peter Leonard (
12556@xyz.molar.is)
Date: Wed 25 Aug 2004 - 16:56:04 GMT

  • Next message: Aaron Dalton: "Imager 0.43 and Perl 5.005_3"

    On Wed, 25 Aug 2004, Tony Cook wrote:

    > 1) scale() doesn't ensure that the output image is at least 1 pixel by 1
    > pixel. The scale(type=>'min', xpixels=>1, ypixels=>1) resulted in an
    > image 0 pixels high (since 1/118 = 0.00847 truncates to 0).
    >
    > 2) the low level image creation code doesn't ensure images are at least
    > 1 x 1 pixels
    >
    > 3) the translation code (which takes an RGB image and a palette),
    > doesn't handle the case when an empty palette is passed in. Since the
    > image generated by scale has no pixels, the generated palette is empty,
    > and so the translation stage fails because it expects at least one color
    > in the palette.
    >

    Thanks for this information - I can at least put in a workaround to not
    attempt to save any images where X or Y is not >= 1.

             --pete



  •