#30242 [NEW]: ...topalette creates 2 colors from 1 color image

From: Date: Sun, 26 Sep 2004 11:17:00 +0000
Subject: #30242 [NEW]: ...topalette creates 2 colors from 1 color image
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66712@lists.php.net to get a copy of this message
From: pmpp at sapo dot pt Operating system: Windows XP PHP version: 4.3.9RC3 PHP Bug Type: *Graphics related Bug description: ...topalette creates 2 colors from 1 color image Description: ------------ I create a truecolor image, fill it with 1 color, then I make that color transparent, but when I convert the image to palette, I get 1 pixel of a slightest different color of the first one, shifted 1pixel to the right of every pixel near a transparent pixel. [GD Version] => bundled (2.0.28 compatible) Reproduce code: --------------- <?php $image = imagecreatetruecolor(100,100) or die(""); $color = imagecolorallocate($image, 255, 229, 178); imagefill($image, 0, 0, $color); imagecolortransparent( $image, $color); imagetruecolortopalette ( $image, 0, 255); imagepng($image); ?> Expected result: ---------------- I expect to have all the image transparent. Actual result: -------------- With a more complex image, it's as I had moved a selection of the NON transparent image, full of a slightest different color of the one I made transparent, moved 1pixel to the right in the background. -- Edit bug report at http://bugs.php.net/?id=30242&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30242&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30242&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30242&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30242&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30242&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30242&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30242&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30242&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30242&r=support Expected behavior: http://bugs.php.net/fix.php?id=30242&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30242&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30242&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30242&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30242&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30242&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30242&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30242&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30242&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30242&r=mysqlcfg

« previous php.bugs (#66712) next »