Forum Archive

AttributeError in PIL _getexif when using pick_asset + get_image on a photo taken on the idevice

cvp

If you use pick_asset then get_image on a screenshot, you get an AttributeError in _getexif function of PIL module, while you don't get this error if you use pick_image...
The same code on a imported photo doesn't give this error...
Bug?

# coding: utf-8
import console
import photos
from PIL import Image
b = console.alert('use','','pick_image','pick_asset',hide_cancel_button=True)
if b == 1 :
    img = photos.pick_image()
else:
    p = photos.pick_asset() # Get asset
    img = p.get_image()         # Get PIL from asset
exif_info = img._getexif()                          # Extract exifs from photo
print(exif_info)
cvp

Sorry, not à screenshot but a photo taken by the idevice!