0

I want to put timestamps on all images in a directory based on the date created/modified.

I've seen a bunch of methods like this and this, but they all use the code %[exif:DateTimeOriginal] which results in an error for me.

I can use the following code

convert input.png -annotate +100+100  "Hello" output.png

But I want to use this instead

convert input.png -annotate +100+100  %[exif:DateTimeOriginal] output.png

But it results in this error:

convert.im6: unknown image property "%[exif:DateTimeOriginal]" @ warning/property.c/InterpretImageProperties/3245.

Does anyone know a fix or can anyone suggest an alternative?

1
  • Add version of ImageMagick to your question.
    – Cyrus
    Nov 16, 2014 at 20:16

2 Answers 2

1

This error indicates that the EXIF tag DateTimeOriginal is not present in your image file, meaning that you can't use it to annotate the image.

1
  • I thought that might be true, but I tried a ton of different images and I thought at least one would have it. Is there an alternative to DateTimeOriginal I could use? Nov 17, 2014 at 5:17
0

I don't know if you're still out there, but perhaps for other users this might help. Sometimes you can use the "file" command to see the metadata of your file. In mine, I could use the "timedate" tag

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .