• Post Reply Bookmark Topic Watch Topic
  • New Topic

image properties

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am working on a web site that allows a user to upload images. When I receive them I want to read the images properties especially the date of when the image was taken. Can anyone help me with this as i have been searching the net for a while and I cant find anything on it.
Thank you david
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The date the image was _taken_? I don't think that gets stored in the file. It may be superimposed on the image when it is taken by some cameras or on the film strip itself (APS film cameras), but within the file format itself? Check the file format specifications for a date field. I don't see one.
 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cant believe that it cant be done. I have an application on my computer that is used to view photos. It can display about 30 properties that the photo has. ie. date taken, camera used, size.....
Someone must have want to have done this before.
I would really appreciate any suggestions.
Java should have an api for reading image properties.
Regards david
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps your photo viewing app is just looking at the image file's creation date and using that as the date it was taken? You could use File.lastModified() to get the last modified date (which may have nothing to do with when it was taken)
I know some graphic formats can include meta-data like date taken, cmaera used, etc., but not all do.
Brian
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do a search for the EXIF file format. It's an extension of JPEG that has additional information attached to it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!