I’m running several CoreImage filters on an image from device’s camera, and have run into unexpected troubles saving the result to Camera Roll. The result of my image manipulations is a CIImage and the data types I can save into ALAssetsLibrary are either CGImageRef or NSData (via writeImageToSavedPhotosAlbum:metadata:completionBlock: and writeImageDataToSavedPhotosAlbum:metadata:completionBlock: respectively).
Seems like a trivial task, but I cannot find a working way to convert my CIImage to a usable data type that can be written to the photo library (with JPEG compression).
Edit: I would like to save image metadata as well, so that rules out some of the simple UIImage saving techniques.
Try this :