1

嗨,我在从 CameraRoll 上传照片、保留 EXIF 并同时旋转图像时遇到问题,因此向上和向下是向下...

到目前为止,我已经成功地上传了完整的 EXIF 图像,但随后我会失去方向,并且在网络上图像有时会放下。我也可以在应用程序中旋转图像,使其成为 UIImage 并使用在堆栈流中找到的示例代码,但随后我将丢失 EXIF。

为了从带有 EXIF 的 Photoalbum 获取图像,我使用这个:` ALAssetRepresentation *assetRepresentation = [asset defaultRepresentation];

ALAssetRepresentation *rep = [asset defaultRepresentation];
Byte *buffer = (Byte*)malloc(rep.size);
NSUInteger buffered = [rep getBytes:buffer fromOffset:0.0 length:rep.size error:nil];
NSData *data = [NSData dataWithBytesNoCopy:buffer length:buffered freeWhenDone:YES];`

如果我将图像保留为 NSdata,则 EXIF 是完整的。如果我让它 UIImage EXIF 丢失。有谁知道如何做到这一点?

/knut

4

0 回答 0