Posted by CANbike on Mon, 20 Oct 2014

Images: Batch Embed Photograph Timestamps

Timestamps on a photograph can be useful for various reasons such as documentation of events, or simply for reference.

It use to be a standard feature to enable or disable on older digital cameras. Unfortunately, my newer cameras lack this feature.

Fortunately, the ImageMagick mogrify command can be used to batch embed a photograph’s EXIF timestamp onto the photo.

mogrify -gravity SouthEast -pointsize 22 -density 300 -fill white -annotate +30+30 %[exif:DateTimeOriginal] *.JPG


  • gravity
    Defines location to position the text.
  • pointsize
    Defines the font size in points, where 1 point is 1/72 of an inch.
  • density
    Defines the pixels per inch of the output device. Default is 72 ppi. 300 ppi is the recommended minimum density for printing photographs.
  • fill
    Color to use when filling in the object (in this case text)
  • annotate
    Add text to the image
    • +30+30
      Offsets for the location of the text, relative to gravity.
    • %[exif:DateTimeOriginal]
      IM Escape command to print EXIF meta-data that was included in the image
  • *.JPG
    Batch wildcard to execute on all files ending with .JPG

Command and Examples

Note: 10MP photographs have been resized to 900×675.

0-ImageMagick Timestamp-thumb.png1-No Timestamp-01-thumb.jpg2-ImageMagick Batch Timestamp-01-thumb.jpg3-No Timestamp-02-thumb.jpg4-ImageMagick Batch Timestamp-02-thumb.jpg

Related Item(s):