I am using GLImageProcessing sample code.I want to save modified image in photo album how it possible.please help me.
i have used beow code but not working.UIGraphicsBeginImageContext(self.view.bounds.size); [self.parentViewController.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *imgNew =UIGraphicsGetImageFromCurrentImageContext(); UIImageWriteToSavedPhotosAlbum(imgNew,nil,nil,nil); UIGraphicsEndImageContext();
jecob
2010-03-02 19:16:47
You can't capture the content of a CAEAGLLAyer using -renderInContext:, which is why that code isn't giving you an image.
Brad Larson
2010-03-03 02:11:21
A:
See this answer to this question for how to use glReadPixels() to extract the image from OpenGL ES within a CAEAGLLayer into a UIImage that you can store in the photos library using UIImageWriteToSavedPhotosAlbum(). The standard approach of using -renderInContext: to generate a UIImage from a CALayer does not work for OpenGL ES content.
Brad Larson
2010-03-03 02:15:58