Saturday 21 November 2015

software - How to overlay date and time onto the corner of photos?


Is there any utility which will read a photo's date and time from its EXIF data and embed it into the corner of the photo?



Answer



If you are comfortable with command line tools from ImageMagick, you can do something like this:


convert orig_image.jpg -gravity NorthWest -annotate 0 "%[EXIF:DateTimeOriginal]"  new_image.jpg

You can run this to batch process all your images.



Details


ImageMagick has an array of command line tools to do different things with image. I'm using the convert tool here with annotate option to annotate a text on the converted image. There are whole bunch of other options that can be used to control font, color, shadow etc. Explaining all will be out of scope of the question, but you can take a look at this doc.


%[EXIF:DateTimeOriginal] is a shortcut for:


identify -format "%[EXIF:DateTime]" 

You can do something like: identify -format "%[EXIF:*DATE*]" to see what all date related strings are stored in exif.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...