views:

43

answers:

1

Hi, lets say I have a CGImage and want to store it in the Photos app that comes standard with every iPod Touch/iPhone how would I do this?

+1  A: 

First convert the CGImage to a UIImage:

UIImage *_myImage = [UIImage imageWithCGImage:cgImage];

And then use the UIImageWriteToSavedPhotosAlbum() function:

UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);

to write the UIImage to the Photo Album.

Alex Reynolds