Hi,
i have a working script for opening and resizing Image from my local photo storage. Like this:
asset = photos.get_asset_with_local_id(file['id'])
print (asset)
data = asset.get_image()
print (data)
wpercent = (mywidth/float(data.size[0]))
hsize = int((float(data.size[1])*float(wpercent)))
data = data.resize((mywidth,hsize))
imgByteArr = io.BytesIO()
data.save(imgByteArr, format='JPEG')
Before i updated to IOS 14 everything works fine. Without changing the script, i no can sometimes use this functions and sometimes i get the Error with file has 0 bytes and is truncated.
Here is the output from the files which are working and which are not working:
working:
not working:
Can someone tell me what my problem is?
Thx a lot.
Cu kami