Is it possible to read the Exif header of a Byte[] or Bitmap object without write it on the disk? I only found one constructor ExifInterface(String filename), and it doesn't seem possible to do that. Could you please confirm?
Otherwise, how could I save that bitmap on the cache directory and take it back in order to read the Exif header?
You could use my metadata-extractor library. It has classes that'll decode Exif (and other formats) from byte[]
, streams, files...
Something like this should work:
Metadata metadata = new Metadata();
new ImageMetadataReader().extract(new ByteArrayReader(bytes), metadata);
Now you can inspect the Metadata
object.
The lib is available via Maven.
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