Why is my _getexif() returning None?

2019-07-18 23:36发布

I have the following Python script:

from PIL import Image
from PIL.ExifTags import TAGS

img = Image.open('/path/1.jpg')
info = img._getexif()
print info

Why is info returned as None, although that I made sure that img has been read?

Thanks.

1条回答
2楼-- · 2019-07-18 23:49

I think the issue was because the image I was reading seemed not to have exif data in the first place, as opposed to the images taken using a mobile phone camera for instance, which the image I was reading apparently hasn't.

查看更多
登录 后发表回答