Created
May 12, 2016 20:08
-
-
Save joswr1ght/f819db3b6a0ba447daa0a1d5dd4a82ff to your computer and use it in GitHub Desktop.
Add EXIF data about camera stuff to a JPG destructively using exiftool and ImageMagick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 1 ] ; then | |
echo "WARNING: Will overwrite source image!" | |
echo "$0 [images]" | |
exit | |
fi | |
for IMAGE in "$@"; do | |
LENS=`exiftool -T -lens $1` | |
CREATEDATE=`exiftool -T -createdate $1` | |
FOCALLEN=`exiftool -T -focallength $1` | |
APERTURE=`exiftool -T -aperture $1` | |
SHUTTERSPEED=`exiftool -T -shutterspeed $1` | |
ISO=`exiftool -T -iso $1` | |
MODEL=`exiftool -T -model $1` | |
DATE=`echo $CREATEDATE | cut -d" " -f1 | sed 's/:/\//g'` | |
TIME=`echo $CREATEDATE | cut -d" " -f2` | |
LABEL=`echo $DATE $TIME $MODEL, $LENS - ISO $ISO $FOCALLEN f/$APERTURE $SHUTTERSPEED \(c\) Joshua Wright, All Rights Reserved` | |
convert $IMAGE -pointsize 80 -fill black -box 'rgba( 215, 215, 215 , 0.5 )' -gravity South -annotate +0+0 "$LABEL" $IMAGE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Produces a text box like the example shown here: