Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python piexif 修改图片exif 信息 #93

Open
zhiwenxuan opened this issue Mar 9, 2023 · 0 comments
Open

Python piexif 修改图片exif 信息 #93

zhiwenxuan opened this issue Mar 9, 2023 · 0 comments

Comments

@zhiwenxuan
Copy link
Owner

import piexif

for index in range(1, 81):
  path = "Drone Others " + str(index) + ".jpg"
  exif_dict = piexif.load(path)
  tag = piexif.ExifIFD.FocalLengthIn35mmFilm
  exif_dict["Exif"][tag] = 25
  exif_bytes = piexif.dump(exif_dict)
  piexif.insert(exif_bytes, path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant