hello,
how can I insert a time stamp (date & time) into an image? the exif information is NOT available. the file creation time stamp is needed.
johannes
file timestamp in image
- whugemann
- Posts: 289
- Joined: 2011-03-28T07:11:31-07:00
- Authentication code: 8675308
- Location: Münster, Germany 52°N,7.6°E
Re: file timestamp in image
What kind of image format are you dealing with? JPEG? (Because you spoke of EXIF.)
Wolfgang Hugemann
Wolfgang Hugemann
Wolfgang Hugemann
Re: file timestamp in image
How are you running the code ? If via php you can get the file change time and there may be similar functions for other languages.
Re: file timestamp in image
hi.
thanks for your answers.
the image format is jpg - it's coming from an ftp upload from an IP cam.
it should be post-processed in linux - only from the command line.
johannes
thanks for your answers.
the image format is jpg - it's coming from an ftp upload from an IP cam.
it should be post-processed in linux - only from the command line.
johannes
- whugemann
- Posts: 289
- Joined: 2011-03-28T07:11:31-07:00
- Authentication code: 8675308
- Location: Münster, Germany 52°N,7.6°E
Re: file timestamp in image
I wonder what you mean by "time stamp". Do you want to write it as text onto the image? (I first understood that you wanted to insert EXIF data or something. This is why I asked for the image format.)
If so, you will find many hints at http://www.imagemagick.org/Usage/annotating, and http://www.imagemagick.org/Usage/windows/#single gives an example how you write a time stamp read from the EXIF data onto an image.
Basically, you need your OS to write the output of the Date command into a variable and then use it in the IM command.
Wolfgang Hugemann
If so, you will find many hints at http://www.imagemagick.org/Usage/annotating, and http://www.imagemagick.org/Usage/windows/#single gives an example how you write a time stamp read from the EXIF data onto an image.
Basically, you need your OS to write the output of the Date command into a variable and then use it in the IM command.
Wolfgang Hugemann
Wolfgang Hugemann
Re: file timestamp in image
hi.
i finally managed to do what i wanted to do ...
thanks, anyway.
here is my solution:
#!/bin/sh
FILEDATE=$(stat testimage.jpg --printf=%y)
montage -geometry +0+0 -background white -label "$FILEDATE" testimage.jpg out.jpg
johannes
i finally managed to do what i wanted to do ...
thanks, anyway.
here is my solution:
#!/bin/sh
FILEDATE=$(stat testimage.jpg --printf=%y)
montage -geometry +0+0 -background white -label "$FILEDATE" testimage.jpg out.jpg
johannes
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: file timestamp in image
Have a look at image annotation.
http://www.imagemagick.org/Usage/annotating/
http://www.imagemagick.org/Usage/annotating/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/