When the delegate method imagePickerController:didFinishPickingMediaWithInfo: for UIImagePickerController is called, you get the asset URL for the particular photo picked.
[info valueForKey:UIImagePickerControllerReferenceURL]
Now this URL can be used to access the asset in the ALAssetsLibrary. Then you would need a ALAssetRepresentation of that accessed asset. From this ALAssetRepresentation we can get the UTI for that image (http://developer.apple.com/library/ios/#DOCUMENTATION/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html)
Maybe the code would make it a bit clearer :
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
if (!(picker.sourceType == UIImagePickerControllerSourceTypeCamera)) {
NSLog(@"User picked image from photo library");
ALAssetsLibrary *library = [[[ALAssetsLibrary alloc] init] autorelease];
[library assetForURL:[info valueForKey:UIImagePickerControllerReferenceURL] resultBlock:^(ALAsset *asset) {
ALAssetRepresentation *repr = [asset defaultRepresentation];
if ([[repr UTI] isEqualToString:@"public.png"]) {
NSLog(@"This image is a PNG image in Photo Library");
} else if ([[repr UTI] isEqualToString:@"public.jpeg"]) {
NSLog(@"This image is a JPEG image in Photo Library");
}
} failureBlock:^(NSError *error) {
NSLog(@"Error getting asset! %@", error);
}];
}
}
As the UTI explains, this should be a sure shot answer to how the image is stored in the photo library.