2009-07-19 37 views
0

与fw 2.2我能够使用UIWindow的私有方法_createCGImageRefRepresentationInFrame获取屏幕截图。在3.0中不存在了。获取PLCameraView显示的3.0

我通过窗口上的PLCameraView使用该方法,只需获取尽可能多的屏幕截图即可拍摄小视频。现在我试着用PLPreviewView和-renderInContext:方法的CALayer,但它总是渲染视图,因为它关闭了虹膜。

我该如何拍摄cameraView显示的画面?

感谢 马尔科

+2

现在有一个惊喜,一个停止工作的私人方法... – 2009-07-19 22:24:48

回答

1

尝试下面的代码来获得

CGImageRef imageRef = [[UIApplication sharedApplication] _createDefaultImageSnapshot]; 
UIImage* img = [UIImage imageWithCGImage:imageRef]; 

//Now you can save it the way you want 
//May as following 
//oops yes this image is just the screenshot so better take care of unwanted image side 
//So cut crap out from the image captured 
UIImageWriteToSavedPhotosAlbum(img, nil, nil, nil); 

在视频录制工作在iPhone 3.0好一会儿,我为保存图像的序列面临的问题,请帮我

等待.........

感谢贾扬特· 。 印度新德里