Skip to content

Instantly share code, notes, and snippets.

@misje
Created August 28, 2019 10:40
Show Gist options
  • Save misje/1e588cba59c8983ed7154acbf5fdcde1 to your computer and use it in GitHub Desktop.
Save misje/1e588cba59c8983ed7154acbf5fdcde1 to your computer and use it in GitHub Desktop.
Strip all but most essensial EXIF tags from pictures
#!/usr/bin/env bash
set -e
set -o pipefail
set -o nounset
PROGNAME="$(basename "$0")"
# Require at least one argument:
[[ $# -lt 1 ]] && {>&2 echo "Usage: $PROGNAME image.jpg..."; exit 1;}
exiftool -overwrite_original -all= -tagsFromFile @ -Artist -ExposureTime -FNumber -ISO -ExifVersion -CreateDate -FocalLength -DateTimeOriginal -ColorSpaceData -ApertureValue "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment