Rewrite exif... path to images


Still working on rewriting exif data to correct the GPS altitude of pix taken by a Mavic 2 Pro. Got it working on one file… now just need to get it working on a whole directory… which leads to my question… was is the path to images uploaded through WebODM.

import piexif
from PIL import Image
fname = “DJI_0387.JPG”

img =
exif_dict = piexif.load([‘exif’])

altitude = exif_dict[‘GPS’][piexif.GPSIFD.GPSAltitude]
exif_dict[‘GPS’][piexif.GPSIFD.GPSAltitude] = (300, 1) // 300 is the new altitude in meters
exif_bytes = piexif.dump(exif_dict)’_%s’ % fname, “jpeg”, exif=exif_bytes)


In WebODM you can look at: