• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to read picture taken time from JPEG

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everybody,

I am building a web page using JSF technology. One of the page has a function to upload pictures into the application and then can be viewed in a thumbnail manner.

My question is realted to Java API not JSF, one of the requirement is to display "picture taken time" along with the picture. Currently, the page displays the time when the picture was loaded as oppose to when the picture was taken. The picture format are usually in JPEG/GIF. Is there a way to retrieve the "picture taken time" from JPEG/GIF file through Java API?

I would highly appreciate any response I can get to complete this requirement.

Thanks in Advance!!

Regards
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're looking for so-called JPEG EXIF data. A Java library that can read it can be found here.

That doesn't work for GIF images, though, which simply doesn't include that data. But since GIF is not well suited for photographs it gets rarely used for that. Maybe you can even disallow GIFs?
 
Pinal N Patel
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot!!

Regards
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic