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

后端 未结 3 1303
無奈伤痛
無奈伤痛 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 01:44

    If you load an image using:

    Image image = Image.FromFile(imageName);
    

    The EXIF values are read into the PropertyItems array on the image.

    I found some code for interpreting these tags as EXIF data. I can't remember where I got it from now but I've found a copy here. I don't think that the code as it stands reads the geolocation codes, but this page claims to have a list of all EXIF tags, so you could extend this code.

    Tag id 0x8825 is the GPSInfo. The GPS tags are enumerated on this page

提交回复
热议问题