Reputation: 6133
How to get tiff image DPI using pillow? Cant see in documentation.
from PIL import Image im = Image.open('test.tif') print("im dpi?")
Upvotes: 23
Views: 34664
Reputation: 238957
Image resolution in DPI should be available in info dictionary (more about info for tiff images can be found here):
info
print(im.info['dpi'])
Though, not all images provide this information.
Upvotes: 39