How can I read the EXIF data from an image taken with an Apple iPhone

后端 未结 3 1301
無奈伤痛
無奈伤痛 2021-01-06 01:07

How can I read the EXIF data from an image taken with an Apple iPhone using C#?

I need the GPS related data.

PS: I know how to read EXIF exc

3条回答
  •  孤城傲影
    2021-01-06 02:00

    I would recommend you take a look at the exiflibrary project on Google Code and its associated ExifLibrary for .NET article on Code Project.

    It supports over 150 known EXIF tags including 32 GPS related ones. Getting the latitude and longitude is as easy as:

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

    It even has a neat little demo application with an interactive visualization of the binary data: ExifLibrary demo

提交回复
热议问题