gpt4 book ai didi

c# - 如何从 Apple iPhone 拍摄的图像中读取 EXIF 数据

转载 作者:太空狗 更新时间:2023-10-29 22:20:58 28 4
gpt4 key购买 nike

如何使用 C# 从 Apple iPhone 拍摄的图像中读取 EXIF 数据?

我需要 GPS 相关数据。

PS:除了用 Apple iPhone

拍摄的图像,我知道如何读取 EXIF

最佳答案

我建议您看一下 exiflibrary Google Code 及其相关项目 ExifLibrary for .NET关于代码项目的文章。

它支持超过 150 个已知的 EXIF 标签,包括 32 个与 GPS 相关的标签。获取纬度和经度非常简单:

var exif = ExifFile.Read(fileName);
Console.WriteLine(exif.Properties[ExifTag.GPSLatitude]);
Console.WriteLine(exif.Properties[ExifTag.GPSLongitude]);

它甚至有一个简洁的小演示应用程序,带有二进制数据的交互式可视化: ExifLibrary demo

关于c# - 如何从 Apple iPhone 拍摄的图像中读取 EXIF 数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2169444/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com