Percent Resizing
// Resize
UIImage *img_mae = [UIImage imageNamed:@"hoge.png"]; // 전
UIImage *img_ato; // 후
float widthPer = 1.5; // 후폭 배율
float heightPer = 1.5; // 후높이 배율
CGSize sz = CGSizeMake(img_mae.size.width*widthPer,
img_mae.size.height*heightPer);
UIGraphicsBeginImageContext(sz);
[img_mae drawInRect:CGRectMake(0, 0, sz.width, sz.height)];
img_ato = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
댓글
댓글 쓰기