我想在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 :(得分:0)
您可以使用[rep metadata]
访问图片的元数据。字典应包含EXIF数据。 EXIF数据无法通过UIImage对象访问。