2012-12-11 3 views
0

이미지의 EXIF ​​데이터를 DictRequest에 저장하고 싶습니다.이미지 저장 이데올로기 EXIF ​​데이터 데이터

어떻게하면됩니까? 나를

아래는 코드 도와주세요 :

ALAssetRepresentation *rep = [temp defaultRepresentation]; 

StrPath = [StrPath stringByAppendingFormat:@"%d.%@",(int)timeInterval,strImageType]; 

UIImage *image = [UIImage imageWithCGImage:[rep fullResolutionImage]]; 
NSLog(@"Image width %f Image height %f",image.size.width,image.size.height); 

NSData *dataObj = nil; 
dataObj = UIImageJPEGRepresentation(image, 1.0); 

NSLog(@"Length of data %d",[dataObj length]); 
NS tring* StrFileData = [Base64 encode:dataObj]; 
NSString* strFileHash = [dataObj md5Test]; 

//---------------------------------------------------- 
NSMutableDictionary *DictRequest = [[NSMutableDictionary alloc]init]; 
[DictRequest setObject:srtprefSessionId forKey:@"SessionId"]; 
[DictRequest setObject:StrPath forKey:@"Path"]; 
[DictRequest setValue:[NSNumber numberWithBool:isTrash] forKey:@"UploadDirectlyToTrashbin"]; 
[DictRequest setObject:StrFileData forKey:@"FileData"]; 
[DictRequest setObject:strFileHash forKey:@"FileHash"]; 
[DictRequest setObject:result forKey:@"DateCreated"]; 

답변

0

당신이 [rep metadata]와 이미지의 메타 데이터에 액세스 할 수 있습니다. 사전에는 EXIF ​​데이터가 포함되어야합니다. EXIF 데이터는 UIImage 개체를 통해 액세스 할 수 없습니다.

관련 문제