From: [EMAIL PROTECTED] Operating system: Win32 / OSF1 PHP version: 4.2.3 PHP Bug Type: *Graphics related Bug description: imagecolorexact etc. not working for 8-bit paletted png
I created an 8-bit paletted png image using PHP, allocating the complete webpalet 51*(r,g,b) with r,g,b in [0,5]. See http://www.phys.uu.nl/~varsity/rowperfect/ - env.php only contains phpinfo(). - grid.php creates "grid.png" in the png subdir. - test.php tries to analyze the colour palette. As you can see the colour (0,0,153) definitely exists in the palette and has index number 212. However, when searching for this colour imagecolorexact() does not return a valid index value (-1) and imagecolorclosest() returns the highest index number (215) which is black (0,0,0). Even worse is imagecolorresolve(): it evidently picks another index (214) and just replaces the existing colour at that position with (0,0,153). The behaviour is exactly the same on this webserver (OSF1, Apache 1.3.27, PHP 4.2.3, GD 1.8.4) as on my home system (Win2k, Apache 2.0.43, PHP 4.3.0-dev, GD 2 built-in). The png image (http://www.phys.uu.nl/~varsity/rowperfect/png/grid.png) renders faultless in IE6, Moz121, Corel Photopaint 9. If you want I can send the grid.php/test.php source. -- Edit bug report at http://bugs.php.net/?id=21668&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21668&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21668&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21668&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21668&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21668&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21668&r=support Expected behavior: http://bugs.php.net/fix.php?id=21668&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21668&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21668&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21668&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21668&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21668&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21668&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21668&r=gnused