How to get a CGImageRef from Context-Drawn Images?
Ok using coregraphics, I'm building up an image which will later be used in a CGContextClipToMask operation. It looks something like the following: UIImage *eyes = [UIImage imageNamed:@"eyes"]; UIImage *mouth = [UIImage imageNamed:@"mouth"]; UIGraphicsBeginImageContext(CGSizeMake(150, 150)); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(context, 0, 0, 0, 1); CGContextFillRect(context, bounds); [eyes drawInRect:bounds blendMode:kCGBlendModeMultiply alpha:1]; [mouth drawInRect:bounds blendMode:kCGBlendModeMultiply alpha:1]; // how can i now get a CGImageRef here