UIImage to NSData 변환
2012. 1. 5. 17:04 in 아이폰

UIImage *img = [UIImage imageNamed:@"test.png"];
NSData *dataObj = UIImageJPEGRepresentation(img, 1.0);
NSData *dataObj = UIImageJPEGRepresentation(img, 1.0);
NSData to UIImage
UIImage *image = [[UIImage alloc] initWithData:obj];
UIImageView = [[UIImageView] alloc] initWithImage:image];
'아이폰' 카테고리의 다른 글
[objective c] 기존 프로젝트에 core data 추가하기 (0) | 2012.01.20 |
---|---|
[objective c] 간단하게 경고 팝업(UIAlertView) 띄우기 (0) | 2012.01.13 |
[아이폰] 웹뷰에서 이벤트 가로채기 (0) | 2011.12.27 |
[iphone/objective c] 어플 내의 document에 데이터 저장하기 (0) | 2011.12.20 |
[xcode] objective c와 c++코드 같이 사용하기 (0) | 2011.12.19 |