Page 1 of 1

imprint Exif DateTime on a jpeg?

Posted: 2007-07-08T07:55:08-07:00
by Leeoniya

Code: Select all

mogrify -density 300 -font Arial -pointsize 16 -stroke white -fill white -gravity SouthEast -draw "text 100,100 '%[EXIF:DateTimeOriginal]'" stampme.jpg
using

Code: Select all

%[EXIF:DateTime]
doesnt work either

can someone tell me what i'm doing wrong?

thanks,
Leon

Re: imprint Exif DateTime on a jpeg?

Posted: 2007-07-08T11:45:09-07:00
by Bonzo
Try something like this:

Code: Select all

mogrify -font verdana.ttf -pointsize 16 -draw \"gravity SouthWest fill white text 0,0 '%[EXIF:DateTimeOriginal]'\" sunflower.jpg
NOTE:
1/ I have used a font I have uploaded to the same folder verdana.ttf
2/ Mogrify will overwrite the original image.
3/ Text 0,0 will not offset the text from the position stated in gravity; if you want it moved add a value to 0,0.

Re: imprint Exif DateTime on a jpeg?

Posted: 2007-07-08T12:37:44-07:00
by Leeoniya
this is in my stamp.cmd file

Code: Select all

mogrify -font Arial -pointsize 50 -stroke white -fill white -gravity SouthEast -draw "text 100,100 '%[EXIF:DateTime]'" -density 300 print.jpg
when i go into command prompt, and type stamp.cmd....it shows as the following:

Code: Select all

mogrify -font Arial -pointsize 50 -stroke white -fill white -gravity SouthEast -draw "text 100,100 'DateTime]'" -density 300 print.jpg
it seems to strip the "%[EXIF:" and actually imprints the text "DateTime]" on the picture.

??
Leon

Re: imprint Exif DateTime on a jpeg?

Posted: 2007-07-08T12:57:03-07:00
by el_supremo
If you are using Windows, then the % is probably being interpreted as introducing a script variable.
Try using a double percent - %%[EXIF:Datetime]

Pete

Re: imprint Exif DateTime on a jpeg?

Posted: 2007-07-09T00:20:47-07:00
by anthony
From IM Examples,
Drawing Special Characters in the Text String
About Percent Characters
http://www.imagemagick.org/Usage/draw/#percent
Up until IM version 6.2.4, the '%' character was used as an escape character to include extra image information in the drawn text string. This is no longer the case as such escapes were confusing and incorrect when SVG images also tried to draw percent characters.
The solution is to use -annotate which does understand % escapes, and was added for that reason. It also does NOT have quote within quotes issues.

See Annotate - Text Drawing Operator
http://www.imagemagick.org/Usage/text/#annotate