Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access metadata (exif tags) of image taken by UIImagePickerController - iOS/iPhone

Is it possible to access the metadata of an image captured by UIImagePickerController in iOS? I understand this can be done with AssetLibrary framework for images captured by the camera application (or otherwise present in the iPhone photo library), but can a developer access any of the metadata/exif info from within an application right after a user has taken a picture? I'm looking for any type of camera exposure-level info from an image after it has been taken. Thanks!

like image 216
Casey Flynn Avatar asked Oct 21 '10 20:10

Casey Flynn


1 Answers

Apparently, you can access the metadata of an image right after it has been taken. The protocol method that is called by the system after an image has been selected is:

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info

The NSDictionary argument, info, contains a key: UIImagePickerControllerMediaMetadata

Now if I can figure out how to get the exif tags or any exposure-level information from this to infer basic information about light-level I will be happy. :)

like image 191
Casey Flynn Avatar answered Oct 26 '22 21:10

Casey Flynn