Bug #51671 [NEW]: imagefill does not work correctly for small images
| From: | a dot schilder at gmx dot de | Date: | Tue, 27 Apr 2010 07:22:02 +0000 |
| Subject: | Bug #51671 [NEW]: imagefill does not work correctly for small images | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-149940@lists.php.net to get a copy of this message | ||
From:
Operating system: Windows XP SP3
PHP version: 5.3.2
Package: GD related
Bug Type: Bug
Bug description:imagefill does not work correctly for small images
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 bug report at http://bugs.php.net/bug.php?id=51671&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51671&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51671&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51671&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51671&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51671&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51671&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51671&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51671&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51671&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51671&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51671&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51671&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51671&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51671&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51671&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51671&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51671&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51671&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51671&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51671&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51671&r=mysqlcfg