用php检测空白生成的图像?

Ken*_*app 7 php imagemagick

如何使用PHP和/或imagemagick检测图像是空白的(只有单个,任意颜色,或使用gif,随机任意颜色的帧)?

我想这就是我要尝试的:http: //www.php.net/manual/en/function.imagecolorat.php#97957

Jos*_*ndo 2

http://www.php.net/manual/en/function.imagecolorstotal.php为您提供图像中的颜色数量。嗯,在我的演示中,它似乎不起作用,抱歉:( 我创建的图像(全红色,20x20 像素)为 PNG 提供 0 种颜色,为 GIF 提供 3 种颜色。

好的:http://www.dynamicdrive.com/forums/showpost.php?p=161187&postcount=2看第二段代码。在这里测试:http://www.pendemo.nl/totalcolors.php