Skip to content

Instantly share code, notes, and snippets.

@charliecm
Created October 15, 2017 16:37
Show Gist options
  • Save charliecm/7167ae566195a12ade7a83de6aa35ec9 to your computer and use it in GitHub Desktop.
Save charliecm/7167ae566195a12ade7a83de6aa35ec9 to your computer and use it in GitHub Desktop.
Copies GPS info from one image to another using exiftool.
#!/usr/bin/env bash
# arg 1 = source, arg 2 = destination
lon=$(exiftool -s3 -GPSLongitude "$1")
lat=$(exiftool -s3 -GPSLatitude "$1")
alt=$(exiftool -s3 -GPSAltitude "$1")
exiftool -GPSLongitude="$lon" -GPSLatitude="$lat" -GPSAltitude="$alt" "${@:2}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment