#30595 [NEW]: Imagecopyresampled function bug

From: Date: Thu, 28 Oct 2004 09:02:48 +0000
Subject: #30595 [NEW]: Imagecopyresampled function bug
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68423@lists.php.net to get a copy of this message
From: lunter at interia dot pl Operating system: WinXP SP2 PHP version: 5.0.2 PHP Bug Type: GD related Bug description: Imagecopyresampled function bug Description: ------------ Imagecopyresampled function bug: Original image: Any one-color square. After resized (reduce 1 pixel width and heihgt): Two colors square with noise !!! Example with PHP code: http://www.pc44.pl/goorol/ImagecopyresampledBug.zip Reproduce code: --------------- <? $im=imagecreatefrompng('original.png'); // 100x100 one-color square $re=imagecreatetruecolor(99,99); imagecopyresampled($re,$im,0,0,0,0,99,99,imagesx($im),imagesy($im)); imagepng($re,'resized.png'); ?> http://www.pc44.pl/goorol/ImagecopyresampledBug.zip Expected result: ---------------- One-color 99x99 square. Actual result: -------------- Two-colors with NOISE 99x99 square. Example with PHP code: http://www.pc44.pl/goorol/ImagecopyresampledBug.zip -- Edit bug report at http://bugs.php.net/?id=30595&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30595&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30595&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30595&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30595&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30595&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30595&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30595&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30595&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30595&r=support Expected behavior: http://bugs.php.net/fix.php?id=30595&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30595&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30595&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30595&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30595&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30595&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30595&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30595&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30595&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30595&r=mysqlcfg

« previous php.bugs (#68423) next »