ALAssetPropertyDate returns “wrong” date

后端 未结 2 1456
梦谈多话
梦谈多话 2021-02-10 16:25

I\'m currently working on a project in which i need to read some (Latitude, Longitude and date ) EXIF data. The location data seems correct, but the date i\'m getting seems to b

2条回答
  •  孤街浪徒
    2021-02-10 17:01

    Though it's not explicitly documented, I'm guessing that this is the expected behavior. The date refers to when the asset was created and when you're modifying the image, you're probably implicitly creating a new asset. Nothing in the ALAsset documentation suggests that its properties correspond to the image's EXIF data.

    To access the EXIF data, you could use the Image I/O framework (available since iOS 4.0), specifically the CGImageSourceCopyProperties function.

提交回复
热议问题