有时 imagecolorat() 在我正在分析的 PNG 中返回 0 和一些像素。这是为什么?
我看了像素,颜色真的是#111111。所以它应该返回 1118481。对吧?
我尝试使用 imagealphablending($img,true) 但我仍然得到 0。
谢谢!
$img = @imagecreatefrompng($png);
if(!$img){
throw new Exception("Error loading PNG.");
}
var_dump(imagecolorat($img, 37, 625));
结果:
int 0