Save a camera photo with an overlayed image - iphone SDK

为君一笑 提交于 2019-12-23 03:25:28

问题


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:


try using

CGImageRef screen = UIGetScreenImage();
UIImage* screenImage = [UIImage imageWithCGImage:screen];
CGImageRelease(screen); 


来源:https://stackoverflow.com/questions/2629667/save-a-camera-photo-with-an-overlayed-image-iphone-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!