获取图像的元数据 - 机器人 [英] Get Meta Data of Image - Android

查看:192
本文介绍了获取图像的元数据 - 机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用<一个href="http://regex.info/exif.cgi?dummy=on&imgurl=http://www.isco.com/webproductimages/appBnr/bnr1.jpg"相对=nofollow>一个网站看到图像的元数据。在这个网站上,它显示了图像的所有信息。我想知道如何得到上图的标题标签的机器人。

I've used a website to see the metadata of a image. In this website, it shows all info of image. I want to know how to get the "Title" tag of above image in android.

我在这里找到适用于iOS的similiar问题只有:如何获得图像元数据在IOS

I found here the similiar question for iOS only: How to get image metadata in ios

不过,我不知道如何让形象元数据的机器人。 ExifInterface 只给出了一些信息。但我无法得到标题的标签吧。

However I don't know how to get "Meta data" of image on android. ExifInterface only gives some informations. But I'm unable to get "Title" tag with it.

你能提供任何code段为得到Android的元数据进行图像?

Can you provide any code snippet for get meta data in android for image?

推荐答案

从这里给......的 clicl下载库 选择版本2.5.0.RC-3.zip ..........

Download metadata extractor from the link given here ...... clicl to download the library choose the version 2.5.0.RC-3.zip..........

解压JAR文件夹

和进口罐子到库文件夹中的poject,然后执行以下code ..............

and import jar into libs folder in your poject and then execute the below code ..............

        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) {}

这篇关于获取图像的元数据 - 机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆