且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在不更改图像的情况下更新ALAsset的exif?

更新时间:2021-11-27 01:45:20

我找到了一种生成imageData的方法.下面的代码:

I found a way to generate imageData. Code below:

Byte *buffer = (Byte *)malloc(dr.size);
NSUInteger k = [dr getBytes:buffer fromOffset:0.0 length:dr.size error:nil];
NSData *data = [NSData dataWithBytesNoCopy:buffer length:k freeWhenDone:YES];

所以我可以将上面的数据与setImageData:metadata:completionBlock:一起使用,以仅更新ALAsset的exif.

So I can use the data above with setImageData:metadata:completionBlock: to update only the exif of ALAsset.