ALAssetRepresentation does not list accurate metadata data for all images

ALAssetRepresentation does not list metadata details properly i, e, when I try to get image metadata, it returns only a few details, as shown below

2015-06-25 10:15:22.134 Phokl copy[1394:607] { ColorModel = RGB; DPIHeight = 72; DPIWidth = 72; Depth = 8; Orientation = 1; PixelHeight = 1250; PixelWidth = 834; "{Exif}" = { ColorSpace = 1; ComponentsConfiguration = ( 1, 2, 3, 0 ); ExifVersion = ( 2, 2, 1 ); FlashPixVersion = ( 1, 0 ); PixelXDimension = 834; PixelYDimension = 1250; SceneCaptureType = 0; }; "{TIFF}" = { Orientation = 1; ResolutionUnit = 2; XResolution = 72; YResolution = 72; }; 

But when I check with other iOS applications and an online exif data extractor, I can see more detailed information about the same image, and what I want is ISOSpeedRatings, FocalLength, LensModel, etc.

Why am I not getting this data using asset.defaultRepresentation.metadata? Does anyone know about this?

  ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; [library assetForURL:info[UIImagePickerControllerReferenceURL] resultBlock:^(ALAsset *asset) { // get imagePropertiesDictionary NSDictionary *imagePropertiesDictionary; imagePropertiesDictionary = asset.defaultRepresentation.metadata; // get exif data NSLog(@"%@",imagePropertiesDictionary); 

Is there an alternative approach in iOS?

Update

I think I found the problem. Actually, I tried with the UIImagePickerController delegate, where I did not get the metadata. But I tried with a copy of the same image directly downloaded from the server, now asset.defaultRepresentation.metadata returns the actual metadata. So the problem is that the image is selected from the photo library using the UIImagePickerController, where the exif data was lost.

is the default behavior of the UIImagePickerController?

+1
ios uiimage alassetslibrary alasset
Jun 25 '15 at 5:17
source share

No one has answered this question yet.

See similar questions:

49
Get Exif Data from UIImage - UIImagePickerController

or similar:

868
Xcode Error "Could not find disk image for developers"
97
Interpret XMP Metadata in ALAssetRepresentation
6
Download UIImage from UIImagePickerControllerReferenceURL
four
Get Retouched Image from ALAssetRepresentation
2
ALAsetRepresentation MD5 image hash does not match duplicate ALAsetRepresentation image symbol
one
Error with metadata [ALAssetRepresentation]
0
ALAssetRepresentation fullResolutionImage with a large image?
0
Implementation of tableView: cellForRowAtIndexPath: with image ALAssetRepresentation
0
Are "PixelHeight" and "PixelWidth" always present in the ALAsetRepresentation metadata?
0
Copying a photo using ALAssetsLibrary writeImageToSavedPhotosAlbum: metadata: completeBlock: changing image orientation



All Articles