【问题标题】:Store image EXIF mata data in dictonary将图像 EXIF 元数据存储在字典中
【发布时间】:2012-12-11 12:57:25
【问题描述】:

我想将图片的EXIF数据存储在DictRequest中。

我该怎么做?请帮帮我

下面是代码:

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"];

【问题讨论】:

    标签: iphone ios xcode upload exif


    【解决方案1】:

    您可以使用[rep metadata] 访问图像的元数据。字典应包含 EXIF 数据。 EXIF 数据不能通过 UIImage 对象访问。

    【讨论】:

      猜你喜欢
      • 2013-09-04
      • 2021-09-04
      • 1970-01-01
      • 2013-07-11
      • 2017-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-27
      相关资源
      最近更新 更多