Tuesday, June 09, 2009

iPhone dev Stupidity 17: Clip Image from CGContext


// create CGImageRef frome UIView context

CGImageRef imageref;

imageref = CGBitmapContextCreateImage(context);


// convert CGImageRef to UIImage;

UIImage *uiImage;

uiImage =[UIImage imageWithCGImage:imageref];

CGImageRelease(imageref);

No comments: