rude04 / metadata-extractor

Automatically exported from code.google.com/p/metadata-extractor
0 stars 0 forks source link

Allow extracting date values as dates somehow #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the API for a tag has getDescription() and essentially you lose all 
typing information.

EXIF dates appear to always be the same formatted 20-character ASCII string, 
yet there is no way (short of pattern) matching to figure out which tags 
*should* be dates.

It would be nice if the library would have a getValue() for any tag which could 
return the value in a more native representation.  In the case of dates though, 
I would still particularly avoid using a millisecond value or a java.util.Date, 
as EXIF dates appear to be local and lack time zone information.

Original issue reported on code.google.com by trejkaz on 25 Jul 2011 at 6:39

GoogleCodeExporter commented 9 years ago
Hi trjkaz,

The good news is that you can already achieve what you're looking for.  The 
Descriptor classes only provide descriptions of the tags within Directory 
instances.  If you look at the Directory class directly, you'll be able to 
access all underlying values in their raw forms via methods such as getDate:

http://code.google.com/p/metadata-extractor/source/browse/trunk/Source/com/drew/
metadata/Directory.java#710

I'll close this issue and try to make the documentation clearer regarding this 
point.  

Drew.

Original comment by drewnoakes on 25 Jul 2011 at 12:51

GoogleCodeExporter commented 9 years ago
Argh, quite right.

I didn't see it at all, because I was looping through the tags and there was 
nothing of the sort on Tag itself.

Original comment by trejkaz on 25 Jul 2011 at 1:01