【问题标题】:How to rotate photograph without losing Exif and Metadata?如何在不丢失 Exif 和元数据的情况下旋转照片?
【发布时间】:2012-08-06 17:39:20
【问题描述】:

在 Android 2.2 中,有没有一种方法可以在不丢失 Exif 和其他元数据的情况下旋转照片?我尝试使用 Matrix 类,但它删除了元数据。

【问题讨论】:

    标签: android exif image-rotation android-2.2-froyo


    【解决方案1】:

    您可以读取 EXIF 数据,旋转图像,然后写入 EXIF 数据。 ExifInterface 从 API 5 开始可用。我在这里找到了一个编写 exif 的示例:Android write EXIF GPS Latitude and Longitude onto JPEG failed

    【讨论】:

      【解决方案2】:

      根据我的研究(2012 年 11 月),如果您调整图像大小(或通过 Bitmap* 类处理它),则无法自动保留 exif 元数据。

      您必须专门按名称检索和复制 exif 属性。这篇博文很有帮助:

      http://vikaskanani.wordpress.com/2011/07/17/android-re-size-image-without-loosing-exif-information/

      我在这里写下了我自己的经历:

      Android Image Resizing and Preserving EXIF data (Orientation, Rotation, etc)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-10-23
        • 1970-01-01
        • 1970-01-01
        • 2014-02-04
        • 1970-01-01
        • 2012-06-01
        • 2017-04-07
        • 2011-08-02
        相关资源
        最近更新 更多