Alex Rivera | Logout

How to get date picture created in java

Asked 2008-09-17T14:25:29.450
10

I would like to extract the date a jpg file was created. Java has the lastModified method for the File object, but appears to provide no support for extracting the created date from the file. I believe the information is stored within the file as the date I see when I hover the mouse pointer over the file in Win XP is different than what I can get by using JNI with "dir /TC" on the file in DOS.

Edit
Report

3 Answers

12

The information is stored within the image in a format called EXIF or link text. There several libraries out there capable of reading this format, like this one

answered 2008-09-17T14:32:26.467
6

The date is stored in the EXIF data in the jpeg. There's a java library and a viewer in java that might be helpful.

answered 2008-09-17T14:27:34.950
0

You probably need something to access the exif data. Google suggests this library.

answered 2008-09-17T14:28:23.310

Your Answer