Page 1 of 1
					
				file timestamp in image
				Posted: 2011-04-22T03:06:14-07:00
				by hahu
				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
			 
			
					
				Re: file timestamp in image
				Posted: 2011-04-22T04:33:25-07:00
				by whugemann
				What kind of image format are you dealing with? JPEG? (Because you spoke of EXIF.)
Wolfgang Hugemann
			 
			
					
				Re: file timestamp in image
				Posted: 2011-04-22T04:54:54-07:00
				by Bonzo
				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
				Posted: 2011-04-22T06:33:51-07:00
				by hahu
				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
			 
			
					
				Re: file timestamp in image
				Posted: 2011-04-22T08:38:30-07:00
				by whugemann
				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
 
			 
			
					
				Re: file timestamp in image
				Posted: 2011-04-22T23:37:22-07:00
				by hahu
				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
			 
			
					
				Re: file timestamp in image
				Posted: 2011-04-22T23:42:28-07:00
				by anthony