你是否想过,为啥就是拍个照片,为啥会占用几十上百兆? 其实除了照片的像素,照片里还附带了很多其他信息。 这个脚本是之前读取大疆精灵4rtk拍摄的照片信息用的,发出来,按需取用。 登录后复制 #!/usr/bin/env python # -*- coding: UTF-8 -*- # Date:2023-06-27 15:00 # Title: from pyexiv2 import Image file_name = r'C:\Users\Administrator\Desktop\DJI_0505.JPG' test = Image(file_name) f = test.read_xmp() print(f) print(f["Xmp.tiff.Model"]) # 相机型号 print(f["Xmp.drone-dji.AbsoluteAltitude"]) #绝对高度 print(f["Xmp.drone-dji.RelativeAltitude"]) #相对高度 print(f["Xmp.drone-dji.GpsLatitude"]) #纬度 print(f["Xmp.drone-dji.GpsLongtitude"]) # 经度 print(f["Xmp.drone-dji.GimbalRollDegree"]) #roll print(f["Xmp.drone-dji.GimbalYawDegree"]) # yaw print(f["Xmp.drone-dji.GimbalPitchDegree"]) # pitch 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19. 原创作者: u_14093483 转载于: https://blog.51cto.com/u_14093483/11286852