Get Image Metadata - Android

http://www.isco.com/webproductimages/appBnr/bnr1.jpg

I used the website to see image metadata. This website displays all image information. I want to know how to get the "Title" tag above the image in android.

I found a similar question here for iOS only: How to get image metadata in ios

However, I do not know how to get the "metadata" of the image on Android. ExifInterface provides only some information. But I can’t get the title tag with it.

Can you provide a code snippet for getting metadata in android for an image?

+4
source share
2 answers

Download the metadata extractor from the link here ...... click to download the library select version 2.5.0.RC-3.zip

Extract a pack of jar

and import the jar into the libs folder in your project, and then execute the code below

  try { InputStream is = new URL("your image url").openStream(); BufferedInputStream bis = new BufferedInputStream(is); Metadata metadata = ImageMetadataReader.readMetadata(bis,true); for (Directory directory : metadata.getDirectories()) { for (Tag tag : directory.getTags()) { System.out.println(tag); } } } catch (ImageProcessingException e){} catch (IOException e) {} 
+9
source

If you want to get ExifInterface image metadata information, this is what you are looking for. Here is a good example of using this interface: http://android-er.blogspot.com/2009/12/read-exif-information-in-jpeg-file.html

But if you want information about an online image, I am afraid that this is not yet possible.

0
source

Source: https://habr.com/ru/post/1436624/


All Articles