我們有一個非常標準的PHP實現圖像大小調整。但是,一些圖像出現綠色色調。調整大小的圖像變成綠色?有任何想法嗎?
下面是原文: http://www.capitallightingfixture.com/product_images/3979WG-514.jpg
這裏的調整: http://www.capitallightingfixture.com/product_images/5-3979WG-514.jpg
我檢查的顏色配置文件上的原始JPG和它的RGB。
這裏是我的PHP的縮放部分:
if (function_exists("gd_info")){
$dst_img = imagecreatetruecolor($thumb_width,$thumb_height);
}else{
$dst_img = imagecreate($thumb_width,$thumb_height);
}
if(@imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_width,$thumb_height,$origw,$origh)){
}else{
imagecopyresized($dst_img,$src_img,0,0,0,0,$thumb_width,$thumb_height,$origw,$origh);
}
imagedestroy($src_img);
imagejpeg($dst_img, '', 85);
圖像的位深度是多少? – 2011-02-10 21:10:50
我很可能會說顏色配置文件問題。你可以在Photoshop中檢查原始圖像是否嵌入了配置文件? – 2011-02-10 21:13:33