tags:

views:

465

answers:

2

I am using GLImageProcessing sample code.I want to save modified image in photo album how it possible.please help me.

A: 

Try this:

UIImageWriteToSavedPhotosAlbum

Mihir Mathuria
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
You can't capture the content of a CAEAGLLAyer using -renderInContext:, which is why that code isn't giving you an image.
Brad Larson
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