I am using the excellent metadata-extractor library. It is very good for retrieving detailed metadata from many different image formats.
However, for a project i am only interested in extracting "common image metadata" (like width and height). In this use case the API is quiet verbose AFIAK.
I am looking for a convenience API like:
final MetadataWrapper md = MetadataWrapper.readMetadata(file);
FileType type = md.getFileType();
int width = md.getWidth();
int height = md.getHeight();
Any suggestions?
If you know exactly what metadata you need, you're probably best off writing a small wrapper around metadata-extractor that checks for specific types of directory, and tests them for given tags.
The concept of 'width' can be specified in many different tags. metadata-extractor doesn't provide any abstraction over these, though there is an issue discussing the idea. It'll be tricky to implement robustly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With