Compressing an image using Quartzcore

CGSize size=CGSizeMake(79, 84);//set the width and height
           UIGraphicsBeginImageContext(size);
           [image drawInRect:CGRectMake(0,0,size.width,size.height)];
           UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
//here is the scaled image which has been changed to the size specified
           UIGraphicsEndImageContext();
Advertisements