#44847 [Opn->Bgs]: Imagefill(), x and y do not work

From: Date: Sun, 27 Apr 2008 17:02:45 +0000
Subject: #44847 [Opn->Bgs]: Imagefill(), x and y do not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-124545@lists.php.net to get a copy of this message
 ID:               44847
 Updated by:       pajoye@php.net
 Reported By:      simslim at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: Win XP
 PHP Version:      5.2.5
-Assigned To:      
+Assigned To:      pajoye
 New Comment:

imagefill _fills_ the image until an edge has been met, what you are
trying to do should be done using imagefilledrectangle.


Previous Comments:
------------------------------------------------------------------------

[2008-04-27 16:55:21] simslim at gmail dot com

Description:
------------
I use imagefill to fill a picture, but no matter what I enter as start
x and y, it always fills the whole image (with x and y higher then 0 and
not higher then image sizes)

Reproduce code:
---------------
header("Content-Type: image/png");
$img	= imagecreatetruecolor(100,100);
$red	= imagecolorallocate($img,255,0,0);
$green	= imagecolorallocate($img,0,255,0);
imagefill($img,0,0,$red);
imagefill($img,50,0,$green);
imagepng($img);

Expected result:
----------------
A picture, 100 x 100, with the left half red and the right half green

Actual result:
--------------
A picture, 100 x 100, completely green


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44847&edit=1



Thread (3 messages)

« previous php.bugs (#124545) next »