Forum

Author Topic: Manipulate photo exif data with python  (Read 3435 times)

mcstieg

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Manipulate photo exif data with python
« on: March 06, 2024, 03:21:36 PM »
Hello Alexey and everybody else,

I'd like to manipulate exif data of my photo set. Is this possible via python script?

I'm able to read data in a for loop. But how can I wrtie new data to the .jpg file?

If I do it like this, the data is overwritten in Metashape. But the original file doesn't change...
Code: [Select]
cameras[0].photo.meta["Exif/Make"]="test"
« Last Edit: March 06, 2024, 03:26:01 PM by mcstieg »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15366
    • View Profile
Re: Manipulate photo exif data with python
« Reply #1 on: March 06, 2024, 04:39:43 PM »
Hello mcstieg,

I think you need to use external Python modules that allow for modification of the EXIF tags/values (for example, PyExifTool), because Metashape doesn't allow to modify the metadata of the original images.

Another way - make external calls to the command-line utilities that allow EXIF data manipulation.
Best regards,
Alexey Pasumansky,
Agisoft LLC