【问题标题】:Can I set metadata attributes on my Image such as, Title, Comment, Rating, Tags in Android?我可以在我的图像上设置元数据属性,例如 Android 中的标题、评论、评级、标签吗?
【发布时间】:2014-08-21 16:22:23
【问题描述】:

我正在使用 ExifInterface 并查看文档,但看不到如何在 android 中设置这些值。有可能吗?

为了澄清,我正在明确寻找如何设置问题中提到的值

ExifInterface Documentation

【问题讨论】:

    标签: android metadata exif


    【解决方案1】:

    也许这个setAttribute(String,String)?

    例如:

    ExifInterface exifInterface = new ExifInterface(filePath);
    
    String tag = exifInterface.getAttribute(TAG_ORIENTATION,0); 
    
    exifInterface.setAttribute(TAG_ORIENTATION, "90");
    exifInterface.saveAttributes();
    

    【讨论】:

    • 我了解如何使用 ExifInterface 方法。但问题是我是否可以设置 Title 等属性。(ExifInterface 文档中没有提到)我可以只使用来自http://msdn.microsoft.com/en-us/library/ms534418%28VS.85%29.aspx 的字符串值吗?
    • @user1 你在ExifInterface 中看到你想要的标签了吗?我猜不是。
    • 不,我在EifInterface 中没有看到我需要使用的任何标签。有志者事竟成
    • 其实在想这个..当然ExifInterface不允许你设置标题、评论等...它只与Exif定义here的信息交互
    猜你喜欢
    • 1970-01-01
    • 2012-07-18
    • 2010-09-22
    • 2014-09-05
    • 1970-01-01
    • 2020-01-21
    • 1970-01-01
    • 2010-09-30
    • 1970-01-01
    相关资源
    最近更新 更多