You need to wrap the image in a PNG view so that it is saved in the photo library in PNG format, and not in JPG format.
I used the following code based on the code from Ben Weiss: UIImageWriteToSavedPhotosAlbum saves the wrong size and quality for comparing sides.
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
NSData* imdata = UIImagePNGRepresentation ( image );
UIImage* im2 = [UIImage imageWithData:imdata];
UIImageWriteToSavedPhotosAlbum(im2, nil, nil, nil);
The image will be saved in PNG format in the Photo Library so that it can be obtained / shared later in full quality.
source
share