CGSize newSize = CGSizeMake(228.0, 228.0);
UIGraphicsBeginImageContext( newSize );
[image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
iPhone SDK Development Basics, Tutorials, Code snippets, Links, and Examples.