4

How do I access the EXIF info in a picture from the camera taken using the new 4.0/4.1 APIs?

I use _captureStillImageAsynchronouslyFromConnection_ to take the picture and:

[AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer];

to get the jpg data but how do I extract the EXIF?

The doco makes references to imageDataSampleBuffer containing EXIF (I can see it in there if I examine the variable in the console):

"The buffer attachments may contain metadata appropriate to the image data format. For example, a buffer containing JPEG data may carry a kCGImagePropertyExifDictionary as an attachment"

But I can't figure out how to manipulate a CMSampleBufferRef to acces it.

Thanks.

4

3 回答 3

5

iOS4 中引入的 Image I/O Framework 允许人们根据文档从图片中读取 EXIF 属性。

链接:CGImageSource 参考- 看看CGImageSourceCopyPropertiesAtIndex函数。

于 2010-09-28T08:23:09.670 回答
0

这个图书馆可以提供帮助。

于 2010-09-09T01:36:37.823 回答
0

您必须将图像实际保存到照片库中,以便将 EXIF 数据添加到图像中。之后,您可以使用 ALAssetLibrary 来检索图像以及 EXIF 信息。

于 2012-12-13T13:28:51.440 回答