Created
June 5, 2013 19:06
-
-
Save jbuchbinder/5716321 to your computer and use it in GitHub Desktop.
Transfer EXIF data to retouched photos using exiv2 utility.
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 | |
# | |
# Transfer EXIF data to retouched photos using exiv2 utility. | |
# Assumes that retouched photos are ${ORIGINAL_PREFIX}_retouched.jpg | |
# @jbuchbinder / jbuchbinder.com | |
# | |
for R in *_retouched.jpg; do | |
O=${R//_retouched.jpg}.jpg | |
echo " * Processing $O -> $R" | |
OE=${O//.jpg}.exv | |
RE=${R//.jpg}.exv | |
# Extract EXIF data | |
exiv2 ex "$O" | |
mv "$OE" "$RE" -f | |
exiv2 in "$R" | |
rm "$RE" -f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment