All for iOS - a site of support of programs for iPhone and iPad
Search
Search text*
Enter text to search
Archive

Review forios.ru on alexa.com
Random user
bwpiar
bwpiar
Male
Who is online
nobody
1

takru.com

SOCPUBLIC.COM - заработок в интернете!

Прибыль каждые 10 минут!

Resizing an UIImage

Resizing an UIImage


-(UIImage*)imageWithImage:(UIImage*)image 
				 scaledToSize:(CGSize)newSize;
{
 UIGraphicsBeginImageContext( newSize );
 [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
 UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
 UIGraphicsEndImageContext();
 
 return newImage;
}

Resizing an UIImage 2


// grab the original image
    UIImage *originalImage = [UIImage imageNamed:@"myImage.png"];
    // scaling set to 2.0 makes the image 1/2 the size. 
    UIImage *scaledImage = [UIImage imageWithCGImage:[originalImage CGImage] scale:2.0 orientation:UIImageOrientationUp];