If you can get your image in an UIImage object, you can use the following code:
UIImageWriteToSavedPhotosAlbum(yourUIImageObject, nil, nil, nil);
That adds your image to the photo library. You should check out the documentation on what all parameters do.