开发者

Count Black Pixels of Image

开发者 https://www.devze.com 2023-03-26 23:02 出处:网络
I 开发者_开发百科am trying to count only the black pixels of a PNG image using PHP.Have not found anything close on the web. Thanks in advance!You can achieve that using gd. Just open the image with i

I 开发者_开发百科am trying to count only the black pixels of a PNG image using PHP. Have not found anything close on the web. Thanks in advance!


You can achieve that using gd. Just open the image with imageCreateFromPNG(), get the image size with imagesx() and imagesy() and then loop over all pixels and do imageColorAt().

0

精彩评论

暂无评论...
验证码 换一张
取 消