views:

498

answers:

1

I think this should be simple but I am having some difficulty implementing it.

I take a photo from the camera, the user can then move and scale it.

They then choose "use" and they get a preview of their image.

Now what I want to do is overlay an image on top of this preview image - which is also ok.

But the part I am having difficulty is then I want to save the photo taken WITH the image that is over it into the library. I just have a UIView with my overlay image about the UIView where my camera photo is previewed. I guess I just need to take a screen capture of these? I don't want to loose resolution OR end up with my UI buttons etc in the final image.

Any suggestions or links would be really useful. Thanks :-)

+1  A: 

try using

CGImageRef screen = UIGetScreenImage();
UIImage* screenImage = [UIImage imageWithCGImage:screen];
CGImageRelease(screen); 
mihirpmehta
Thanks for the tip, I ended up using this http://www.skylarcantu.com/blog/2009/10/16/saving-a-view-as-an-image/ but your post helped me find it! I loose quite a lot of image quality though, any ideas how I can improve this?