Save heif image data to photo library without encoding

I understand that not all devices can encode the new heif format. I have an app which has access to heif images which have been encoded elsewhere and I want to save them to the photo library/camera roll on devices which cannot encode heif data (such as an iPhone 6). The image data is in an NSData object and was encoded on another iOS device.


What API do I need to use to do this?

Answered by SirGreenDragon in 248209022

The answer appears to be to use this:


- (void)addResourceWithType:(PHAssetResourceType)type

fileURL:(NSURL *)fileURL

options:(PHAssetResourceCreationOptions *)options;

Accepted Answer

The answer appears to be to use this:


- (void)addResourceWithType:(PHAssetResourceType)type

fileURL:(NSURL *)fileURL

options:(PHAssetResourceCreationOptions *)options;

Save heif image data to photo library without encoding
 
 
Q