I have a CGContextRef and I did my drawing stuff with the bitmap context.
Now, I would like to have a function call to get a UIImage for the CGContextRef. How do I do that?
Something like this :
-(UIImage*)doImageOperation
{
// Do your stuff here
CGImageRef imgRef = CGBitmapContextCreateImage(context);
UIImage* img = [UIImage imageWithCGImage:imgRef];
CGImageRelease(imgRef);
CGContextRelease(context);
return img;
}