UIImage Resizing

// 리사이징.
UIImage *img_mae = [UIImage imageNamed:@"hoge.png"];  // 리사이징전
UIImage *img_ato;  // 후
CGFloat width = 100;  // 후폭
CGFloat height = 200;  // 후높이.

UIGraphicsBeginImageContext(CGSizeMake(width, height));
[img_mae drawInRect:CGRectMake(0, 0, width, height)];
img_ato = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext(); 

댓글

이 블로그의 인기 게시물

파이썬으로 Homomorphic Filtering 하기

파이썬으로 2D FFT/iFFT 하기: numpy 버전