How to Extract Creation Time / Date of .jpg Image from Linux WebServer ?
Posted on 2004-11-02
This is what I've been trying to do:
I've been stuck trying to do this for some days now. It doesn't seem like its very difficult, but for some reason I haven't been able to figure it out.
I'm working on a project where I need a .jpg image is sent from a Canon S400 camera to a custom application which processes it (for cropping etc.), which is then ftp'd to a LINUX Web Server (the image is copied to another .jpg file), and is then displayed on the webpage.
Now, the problem is that, presently, the time being displayed under the image is the time from the local host machine...so it changes from machine to machine. I want the time the image was taken from the camera, i.e., the time the picture was taken, which I believe is available in the image header file.
However, I do believe that this can be done by extracting the creation date and time of the image from the file system structure (that contains directory information for each file stored on the hard disk). Since the .jpg image will be stored in the file system, I need to find the operating system call that will return the creation date and time from the file system structure. By the way, just to reiterate, its a LINUX Web Server.
It would be great if someone could reply to this asap with the system call for doing this, and the code in Java (or some other script / language), with which the time / date could be displayed on the webpage.
Thanks a million.