我正在嘗試使用 Pillow 庫從影像中獲取所有元資料標簽,但我在這里只得到 5 個標簽:
ExifOffset :140
Make :HUAWEI
Model :VOG-L29
Software :Adobe Lightroom 5.0 (Android)
DateTime :2019:12:10 11:40:30
這是我的代碼:
from PIL import Image
from PIL.ExifTags import TAGS
file = 'IMG_20191210_114027.jpg'
img = Image.open(file)
img_exif = img.getexif()
for tag_id in img_exif:
tag=TAGS.get(tag_id,tag_id)
data=img_exif.get(tag_id)
if isinstance(data,bytes):
data=data.decode()
print(f"{tag:20}:{data}")
這是我使用的
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/338085.html
上一篇:為什么upng-js回傳的imagedata格式不正確?
下一篇:文字向左浮動,圖片向右浮動
