From: new at springtimesoftware dot com Operating system: Linux PHP version: 4.3.5 PHP Bug Type: GD related Bug description: Images computed by GD Library incorrect
Description: ------------ Hi. I think I'm encountering an error in the GD Library. This happens in PHP Version 4.3.5 running on Linux but does not happen in Version 4.1.2 running on Windows 98. Please download and unzip http://www.springtimesoftware.com/public/gd-error-bmp.zip . This file contains a bitmap file that shows two images. The top image, a picture of a building, was generated by browsing to the file gd-error-jpg.php (see below) on my local computer (system "localhost"). The second image is generated by browsing to the same file located on a remote server, at address http://www.springtimesoftware.com/public/gd-error-jpg.php . Note that the second image appears to be grayed, which is an error. I've localized the error to the "imagecopy" function. I don't have the source files, so I can't debug. You can browse to http://www.springtimesoftware.com/public/bldg.jpg to see the original image which is processed by gd-error-jpg.php. I thought that bldg.jpg might have an incorrect format, but using sunset.jpg, which was generated by a different program, also results in an error (the image is black this time). Here are the contents of the gd-error-jpg.php file: <? Header("Content-Type: image/jpeg"); $file = "bldg.jpg"; $Size = getimagesize($file); $w = $Size[0]; $h = $Size[1]; $im = ImageCreate($w, $h); $pic = imagecreatefromjpeg($file); imagecopy($im, $pic, 0, 0, 0, 0, $w, $h); ImageJPEG($im); ImageDestroy($pic); ImageDestroy($im); ?> Thanks, David -- Edit bug report at http://bugs.php.net/?id=27934&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27934&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27934&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27934&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27934&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27934&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27934&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27934&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27934&r=support Expected behavior: http://bugs.php.net/fix.php?id=27934&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27934&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27934&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27934&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27934&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27934&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27934&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27934&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27934&r=float