A program that calculates transparency % of image

Hello! I am looking for kinda script or program(best way a web program which works similary as value converters or theese converters where you upload an image in one format and it outputs another one) that could do as follows:

  • Read the transparency of each pixel in image and set it to boolean in it’s calculations(transparent or not, no matter if it splits transparency in 50% to get alpha clip results or other way…)
  • It calculates total pixel count
  • It calculates how many pixels out of all the pixels are transparent
  • It shows me the number

Don’t ask me why I need this, just point me to this type of program if you know any or if you know how to find it in Google(I didn’t succeed). I just tell you that this is releated to Blender Game Engine in my case, but you may even not notice it, lol

Thank you!:slight_smile:

For working with images I usually use the Python imaging library; PIL
But it’s a bit out of date, only works with older versions of python.
There’s some other libs which could help you. Just google about PIL first.