Manipulate image metadata (EXIF, IPTC) with open source tools

Date: 2013-07-17 tags: Linux

Rename picture based on capture date:

find -name 'IMG*.JPG' | while read PIC; do DATE=$(exiftool -p '$DateTimeOriginal' $PIC | sed 's/[: ]//g'); touch - t $(echo $DATE | sed 's/\(..$\)/\.\1/') $PIC;echo "Date:" $DATE "- " $PIC; mv -i $PIC $(dirname $PIC)/`date +%Y%m%d_%T`_$DATE.jpg; done

Rename:

exit2 -t *.jpg
exiv2 -r Description_%Y%m%d_%H%M%S *.jpg

Add copyright:

exiftool -copyright="John Doe" *.jpg

Add EXIF comment:

exiv2 -M"set Exif.Photo.UserComment charset=Ascii This is a comment" *.JPG



Thanks for reading this post!


Did you find an issue in this article?

- click on the following Github link
- log into Github with your account
- click on the line number containing the error
- click on the "..." button
- choose "Reference in new issue"
- add a title and your comment
- click "Submit new issue"

Your feedback is much appreciated! πŸ€œπŸΌπŸ€›πŸΌ

You can also drop me a line below!