• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Date Picture Taken of the photo is empty

 
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi & Thanks,

Basically, I have a camera photo. I put a label on it and save it.
After I saved, the attribute Date Picture Taken of the photo is empty when I check the photo with window explorer.

What is the issue here?


 
Bartender
Posts: 3323
86
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The date information is held in the meta data of the file. I'm not sure how this can be set but I know there are free Java libraries for reading the data such as http://code.google.com/p/metadata-extractor/. Sorry I can't be of more help other than suggesting you google for details on how to set the meta data.
 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tony,

Download MetadataExtractor and used it. I noticed:

Before saved (using the code posted) Exif information of the camera photo are there.

After saved (using the code posted) Exif information of the camera photo are NOT longer there.

Is there alternative to using javax.imageio.ImageIO?
 
Saloon Keeper
Posts: 10705
86
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if your creating a platform independent application, but if not, there is a great command line tool (free) called exiftool that you can exec(). I've found this tool to be more robust and complete than metadata-extractor. But of course it's not a java library.
 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With the java code posted as I need to put a label over the picture, the tag DateTimeOriginal which is Date Taken Picture of the photo jpg file is no longer there.

I try to use exiftool to add that tag (as it's a new tag as the existing one is gone), I could not see what the syntas is.

-To mod the existing tag
exiftool "-DateTimeOriginal+=5:10:2 10:48:0" mypicture.jpg

-To add the new tag DateTimeOriginal, what is the syntax? Could not figure out.
 
Tony Docherty
Bartender
Posts: 3323
86
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read section 5 of the tools FAQ at http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html
 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Thanks Tony & Carey,
2. Used & OK. (use java code to put a label and exif to add dateTimeOriginal)

exiftool -exif:dateTimeOriginal="2014:01:01-00:00:00" A.JPG
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic