Hi,
yes, you can use here the "piexif" Python library to achieve this.
Here is a python script to batch, and i hope i could help you.
import piexif
import os
def adjust_altitude(image_path):
exif_dict = piexif.load(image_path)
if piexif.GPSIFD.GPSAltitude in exif_dict["GPS"]:
altitude = exif_dict["GPS"][piexif.GPSIFD.GPSAltitude]
adjusted_altitude = (altitude[0] * -1, altitude[1])
exif_dict["GPS"][piexif.GPSIFD.GPSAltitude] = adjusted_altitude
exif_bytes = piexif.dump(exif_dict)
piexif.insert(exif_bytes, image_path)
def batch_adjust_altitudes(directory):
for filename in os.listdir(directory):
if filename.lower().endswith(('.png', '.jpg', '.jpeg')):
adjust_altitude(os.path.join(directory, filename))
batch_adjust_altitudes('path')
Replace 'path' with the path to the directory containing your images.
and you have to install the piexif library.
Best Regard
Photo