UIImageの拡大縮小(iPhone cocoa)
30x40のサイズにする場合。
CGRect newRect = CGRectMake(0, 0, 30, 40); UIGraphicsBeginImageContext(newRect.size); [image drawInRect:rect]; UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
30x40のサイズにする場合。
CGRect newRect = CGRectMake(0, 0, 30, 40); UIGraphicsBeginImageContext(newRect.size); [image drawInRect:rect]; UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();