Guys, I\'m looking for a bit of assistance. I\'m a newbie programmer and one of the problems I\'m having at the minute is trying to convert a black & white .jpg
.jpg
Or if you want to count white or black pixels
This is also a solution:
from PIL import Image import operator img = Image.open("your_file.png").convert('1') black, white = img.getcolors() print black[0] print white[0]