Hi, I want to retrieve the bit depth for a jpeg file using Python.
Using the Python Imaging Library:
import Image
data = Image.open('file.jpg')
print data.depth
However, this gives me a depth of 8 for an obviously 24-bit image. Am I doing something wrong? Is there some way to do it with pure Python code?
Thanks in advance.
Edit: It's data.bits not data.depth.