Imagemagick and exif data labels question?

I have a relatively large number of photos which I need to print with the timestamp and also add comments on the face of the image. I'm using convert to run through the directory to apply the timestamp to the image itself. #!/bin/bash for file in *.jpg ; do convert "$file" -font <whatever> \ -pointsize 72 -fill white -annotate +100+100 \ %[exif:DateTimeOriginal] "new-${file}" done I'm also using convert to apply the comment by hand for each image. convert <image>.jpg -gravity South -pointsize 30 -annotate +0+120 'This is a comment.' temp1.jpg I would like to preserve my comments as exif data and pull them out to then label the images in batches using the first example as a template. Is it possible to define your own exif data and mung it into the image file? Or perhaps there is a gui tool which lets you view the image and also save a comment as exif for labeling? If I'm going to type comments I'd really like them to be part of the image record for future extraction at will. Also if someone has suggestions on how to style and make the labeling font stand out on colour images, which are not converted to greyscale, but are then printed in black and white, I'd appreciate them. Thanks. -- Russell Sent by K-9 Mail

Russell via talk wrote:
I would like to preserve my comments as exif data and pull them out to then label the images in batches using the first example as a template.
Is it possible to define your own exif data and mung it into the image file?
You can use exiftool, <https://www.sno.phy.queensu.ca/~phil/exiftool/>. To add a comment to the file with: $ exiftool burt-reynolds.jpg -Comment='Look at Burt Reynolds in a Turtle Neck' 1 image files updated and then extra it with: $ exiftool burt-reynolds.jpg -Comment Comment : Look at Burt Reynolds in a Turtle Neck

jhead is another command line tool that can manipulate jpeg exif and comment fields. <http://www.sentex.net/~mwandel/jhead/> -- Scott

Thanks I installed exif tool and was able to insert the comment as I need. Something funny with the encoding tho. russ@HECTOR:~/SCRIPTS$ exiftool temp1.jpg |grep Comment Comment : This is the comment. Warning : Invalid EXIF text encoding for UserComment User Comment : FM0 FC111110011:zzzzzz0 7 93 05002d03d42de5183d2 cc0 990 02581c9e 023b1c9e 021e1c4c 02011c2c 01e41c53 01c91b47 02461a36 0 Strings output shows the added text comment is positioned on line two, while the exif cmd has the comment in the middle of output. My kludge is not exactly elegant, but I can get started on annotating the images with imagemagick. russ@HECTOR:~/SCRIPTS$ strings temp1.jpg |sed "1d"|less|head -1 This is the comment. Thanks also Scott. I think jhead looks interesting but I can work with exiftool to do what I need for now. Cheers On September 13, 2017 2:27:49 PM EDT, "Myles Braithwaite 👾" <me@mylesb.ca> wrote:
Russell via talk wrote:
I would like to preserve my comments as exif data and pull them out to then label the images in batches using the first example as a template.
Is it possible to define your own exif data and mung it into the image file?
You can use exiftool, <https://www.sno.phy.queensu.ca/~phil/exiftool/>.
To add a comment to the file with:
$ exiftool burt-reynolds.jpg -Comment='Look at Burt Reynolds in a Turtle Neck' 1 image files updated
and then extra it with:
$ exiftool burt-reynolds.jpg -Comment Comment : Look at Burt Reynolds in a Turtle Neck
-- Russell Sent by K-9 Mail
participants (3)
-
Myles Braithwaite 👾
-
Russell
-
Scott Allen