[php-maint] Bug#448257: php5 imagefill bug

Brian Ridley ptlis at ptlis.net
Sat Oct 27 14:25:59 UTC 2007

Package: php5
Version: 5.2.0-8+etch7

The following code should generate a png image with a transparent 
background and a red circle in the middle, but causes a Segmentation fault:
    $png = imagecreatetruecolor(800, 600);
    imagesavealpha($png, true);

    $trans_colour = imagecolorallocatealpha($png, 0, 0, 0, 127);
    imagefill($png, 0, 0, $trans_colour);
    $red = imagecolorallocate($png, 255, 0, 0);
    imagefilledellipse($png, 400, 300, 400, 300, $red);

    imagepng($png, 'test.png');
However if you comment out the call to the imagefill function it works 
fine, I think it might be due to this bug 
http://bugs.php.net/bug.php?id=39508 as I cannot find any mention of 
this being fixed in the changelog.

More information about the pkg-php-maint mailing list