You are reading a single comment by @grams and its replies.
Click here to read the full conversation.
-
The PNG is using an indexed colour palette. You can convert the image to RGB in memory
img.convert('RGB')
or look up the values in the palette yourself.
If I query a JPG image using img.getpixel it returns eg 255, 255, 255 but if I do the same to a PNG file it returns a numeric value from 0 to in this case 34.
Why?