I\'m using following code to add rounded corners to my UIImage, but the problem is that the rounded corners are showing \"white\" area instead of transparent or \"clear\". W
lukya's comment below your question is what you probably want to do.
Make sure you import QuartzCore:
#import
Then, if you have a UIImageView of your image that you want to have rounded corners, just call (assuming imageView is a property and cornerRadius is the desired corner radius):
self.imageView.layer.cornerRadius = cornerRadius;
self.imageView.clipsToBounds = YES;
Since you already have self.CGImage, you could do this to create a UIImageView:
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageWithCGImage:self.CGImage]];
Just make sure to release the imageView after you add it as a subview.