php中imagepng输出的图像掉色的问题

有个简单的程序

header("Content-type: image/png");
$im = imagecreatefrompng("test.png");
imagepng($im);
?>

发现页面上显示的图片和test.png相比掉了很多色

用imagepng($im, "haha.png");
再file test.png haha.png
发现haha.png大小比test.png小
而且haha.png的类型是8-bit colormap
而test.png就是8-bin/color RGB

而且,如果把图改成jpeg的

imagecreatefromjpeg

最后imagejpeg($im)也不会掉色

请问这是为什么呀

系统是kernel2.4.9 + php4.3.10 + gd1.8.4

后来没办法

把gd升级到2.0.33后问题解决

Discussion Area - Leave a Comment




*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word