From:             jeroen dot clarysse at easynet dot be
Operating system: MacOS 10.3.4
PHP version:      4.3.8
PHP Bug Type:     GD related
Bug description:  imagefilltoborder not filling downwards

Description:
------------
the imagefilltoborder call will flood fill upwards only. 
it's pretty easy to see : http://
ldab.arts.kuleuven.ac.be/gdtest.php

I ran it on 3 other macs, clean installs with the PHP 
module from www.entropy.ch, which has very good fame 
among OSX people.

the weird part is that linux code works fine... 

I downloaded sources from 4.3.6 up to 4.3.9, and 
compared the gdImageFillToBorder calls. They are 
identical (even the original GD from Boutell has the 
same code) so I really don't know what could be wrong.

cheers

Reproduce code:
---------------
header("Content-type: image/png");
// create a blank image
$image = imagecreate(400, 300);

// fill the background color
$bg = imagecolorallocate($image, 0, 0, 0);
// choose a color for the ellipse
$col_ellipse = imagecolorallocate($image, 255, 255, 255);

// draw the ellipse
imageellipse($image, 200, 150, 300, 200, $col_ellipse);
imagefilltoborder($image, 200, 150, $col_ellipse,$col_ellipse);

// output the picture
header("Content-type: image/png");
imagejpeg($image);

Expected result:
----------------
a fully white ellipse on a black square

Actual result:
--------------
on a black square, an ellipse with white border, upper 
half filled white

-- 
Edit bug report at http://bugs.php.net/?id=29232&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29232&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29232&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29232&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29232&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29232&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29232&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29232&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29232&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29232&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29232&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29232&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29232&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29232&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29232&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29232&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29232&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29232&r=float

Reply via email to