I am printing out the R,G,B values of an image and get results like this:
(30, 0, 0)
(29, 0, 0)
(28, 0, 0)
(27, 0, 0)
(26, 0, 0)
(25, 0, 0)
(24, 0, 6)
(23, 0, 0)
(22, 0, 0)
(21, 0, 0)
That is just a partial list of the values but you can see that in the one grouping it has (24,0,6) which is what I'm after. How can I get just that group or any others like it to print out, instead of the entire list? I'm assuming I need an if statement with > 0 but am not sure how to implement it. This is the initial code:
from PIL import Image
i = Image.open('Img.bmp')
for pixel in i.getdata():
print pixel