, , , , . Python PIL (Python Imaging Library - http://www.pythonware.com/products/pil/), , .
Here is an example of what can help you get started.
image = Image.open("image.png")
datas = image.getdata()
for item in datas:
if item[0] < 255 and item[1] < 255 and item[2] < 255 :
// THIS PIXEL IS NOT WHITE
Of course, this will count any pixel that is not completely white, you might want to add some addition, so pixels that are not EXACT white are also turned white. You will also need to keep track of which pixel you are currently viewing.
source
share