#36683 [Opn->Bgs]: imagefill doesn't work on imagecreatetruecolor images
ID: 36683
Updated by: pajoye@php.net
Reported By: mike at agftech dot com
-Status: Open
+Status: Bogus
Bug Type: GD related
Operating System: Fedora 3
PHP Version: 5.1.2
-Assigned To:
+Assigned To: pajoye
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Use the bundle GD or be sure that you use the bundle GD. It works
perfectly.
Previous Comments:
------------------------------------------------------------------------
[2006-03-10 17:51:30] mike at agftech dot com
Description:
------------
imagefill() does not work on images created with the function
imagecreatetruecolor(). Any attempt to use imagefill() returns the
standard black image.
Note: I am using the GD version that is bundled with PHP 5.1.2
Reproduce code:
---------------
$print = imagecreatetruecolor(300, 500);
$image = imagecreatetruecolor(555, 555);
$color = imagecolorallocate($image, 255, 255, 0);
imagefill($image, 0, 0, $color);
imagecopy($image, $print, 50, 50, 0, 0, 300, 500);
header("Content-type: image/jpg");
imagejpeg($image);
imagedestroy($image);
Expected result:
----------------
A 555x555 yellow square with a 300x500 black square offset 50x50
inside.
Actual result:
--------------
555x555 black square.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36683&edit=1
Thread (8 messages)