#41057 [NEW]: imagepng creates incorrect sized png

From: Date: Wed, 11 Apr 2007 19:37:12 +0000
Subject: #41057 [NEW]: imagepng creates incorrect sized png
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-111376@lists.php.net to get a copy of this message
From: rempargo at gmail dot com Operating system: Windows XP Home PHP version: 5.2.1 PHP Bug Type: GD related Bug description: imagepng creates incorrect sized png Description: ------------ imagepng creates incorrect sized png file if imagecreatetruecolor parameters are smaller then 26. e.g. 25 x 25 becomes 31 x 31. The problems only occurs with imagepng, not with imagejpg nor with imagegif. Reproduce code: --------------- <?php header ("Content-type: image/png"); $im = @imagecreatetruecolor(25, 25) or die("Cannot Initialize new GD image stream"); imagepng($im,null,0); imagepng($im,'test.png',0); imagejpeg($im,'test.jpg',100); imagegif($im,'test.gif'); imagegd2($im,'test.raw'); imagedestroy($im); ?> -- Edit bug report at http://bugs.php.net/?id=41057&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41057&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41057&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41057&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41057&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41057&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41057&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41057&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41057&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41057&r=support Expected behavior: http://bugs.php.net/fix.php?id=41057&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41057&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41057&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41057&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41057&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41057&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41057&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41057&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41057&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41057&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41057&r=mysqlcfg

« previous php.bugs (#111376) next »