저는 Core Image 프레임 워크를 가지고 놀고 있습니다. 이미지의 경우 (NSImage), 먼저 CIImage으로 변환해야합니다. 나는 그걸 할 수있어.CSImage를 NSImage로 변환합니다.
NSImage *im1 = [[NSImage alloc] initWithContentsOfFile:imagepath];
NSRect rect1;rect1.size.width = img1.size.width; rect1.size.height = img1.size.height;
CGImageRef imageRef1 = [img1 CGImageForProposedRect:&rect1 context:[NSGraphicsContext currentContext] hints:nil];
CIImage *ciimage = [CIImage imageWithCGImage:imageRef1];
난 I 테스트 할 코어 이미지 (CIImage)에 코어 이미지 필터를 적용하는 기능을 갖는다. 그리고 출력 이미지를 하위 뷰로 창에 추가하려고합니다. 그래서 NSImage가 필요합니다. 어떻게이 코어 이미지를 다시 NSImage로 변환 할 수 있습니까? Google에 질문하면 좋은 결과를 얻지 못합니다.
도움 주셔서 감사합니다.
제안이 좀 더 쉽게 3 with : CGImageRef imageRef1 = [img1 CGImageForProposedRect : 없음 컨텍스트 : 없음 힌트 : 없음]; –