• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic