이미지 자르기

// 자르기
UIImage *img_mae = [UIImage imageNamed:@"hoge.png"];  // 전 영상
UIImage *img_ato;  // 후 영상
CGRect rect = CGRectMake(30, 30, 200, 100);  // 자를 공간

UIGraphicsBeginImageContext(rect.size);
[img_mae drawAtPoint:rect.origin];
img_ato = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext(); 

댓글

이 블로그의 인기 게시물

파이썬으로 Homomorphic Filtering 하기

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