+ (UIImage*)resizeImageWithImage:(UIImage*)image toSize:(CGSize)newSize { // Create a graphics image context UIGraphicsBeginImageContext(newSize); // draw in new context, with the new size [image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)]; // Get the new image from the context UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); // End the context UIGraphicsEndImageContext(); return newImage; }
This worked great! I used it to resize images into thumbnails for a table view.
ReplyDeleteThanks!
Jeff
how can i resize multiple image through array
ReplyDelete