Hello anyone,
Is it possible (in Java, ExifToolWrapper) to get all tags from a file? In Exiftool I would use the special All tag name to get all tags. But that does not seem to work in Java.
I tried this, when I uncomment the two lines that add known tag names, I get these tags. But with "All" I get an empty Map.
HashSet hs=new HashSet<String>(10);
//hs.add(TAGTHUMBNAILLENGTH); // De string "ThumbnailLength"
//hs.add(CREATEDATE);
hs.add("All");
Map<String,String> resultaat=exifToolWrapper.getTagsFromFile(inputFile,hs);
Carl van Denzen
Hi Carl,
I'm not familiar with the Java wrapper, but the exiftool application (probably used by the wrapper) will return all tags if none are specified. What happens if you leave "hs" empty, or maybe don't pass it to the function?
- Phil
Phil, thank you for your response.
>:( I can not find a way to get all tags via the Java ExifToolWrapper. I will try to contact the author of ExifToolWrapper (or maybe code it myself into the wrapper). I tried your suggestions, but:
// hs.add("All"); gives nothing, i.e. empty resultaat
// hs=null; gives NullPointerException
// Empty hs gives nothing, i.e. empty resultaat
Map<String,String> resultaat=exifToolWrapper.getTagsFromFile(inputFile, hs);
There is no method that doesn't take a set of Tags (the variable hs in my code).
If there is a solution, I will try not to forget to post it into this forum.
Carl.
How about hs.add("") or hs.add()
Quote from: ryerman on September 17, 2010, 09:05:03 AM
How about hs.add("") or hs.add()
No, that is not going to work. I looked at the source and there is a line "if (tagNames.contains(tag))".
I changed the source and posted it as a feature request to the author (you can see it at SourceForge, feature request at project Moss (http://sourceforge.net/tracker/?func=detail&aid=3068981&group_id=179411&atid=889046)).
Carl van Denzen
Edit: added link to feature request - PH