Bug #51671 [Opn->Asn]: imagefill does not work correctly for small images
| From: | pajoye@php.net | Date: | Tue, 27 Apr 2010 07:52:39 +0000 |
| Subject: | Bug #51671 [Opn->Asn]: imagefill does not work correctly for small images | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-149943@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51671&edit=1
ID: 51671
Updated by: pajoye@php.net
Reported by: a dot schilder at gmx dot de
Summary: imagefill does not work correctly for small images
-Status: Open
+Status: Assigned
Type: Bug
Package: GD related
Operating System: Windows XP SP3
PHP Version: 5.3.2
-Assigned To:
+Assigned To: pajoye
Previous Comments:
------------------------------------------------------------------------
[2010-04-27 09:22:01] a dot schilder at gmx dot de
Description:
------------
I try to use imagefill() with an image that has a width of one pixel,
but it does not work. For larger image it works as expected.
Test script:
---------------
// image 1
$image = imagecreatetruecolor(50, 50);
$white = imagecolorallocate($image, 255, 255, 255);
imagefill($image, 0, 0, $white);
imagegif($image, __DIR__ . '/50x50.gif');
// image 2
$image = imagecreatetruecolor(1, 50);
$white = imagecolorallocate($image, 255, 255, 255);
imagefill($image, 0, 0, $white);
imagegif($image, __DIR__ . '/1x50.gif');
Expected result:
----------------
1) White image, 50x50 pixel.
2) White image, 1x50 pixel.
Actual result:
--------------
1) White image, 50x50 pixel.
2) Image, 1x50 pixel, with the first two pixels (0/0, 1/0) in white, the
rest in the default color (black).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51671&edit=1