title: Converting CIImage Into NSImage
body: <p>I'm playing with the Core Image framework.  As I understand, if I have an image (<strong>NSImage</strong>), it needs to be converted into <strong>CIImage</strong>, first.  I can do that.</p>
  
  <pre><code>NSImage *im1 = [[NSImage alloc] initWithContentsOfFile:imagepath];
  NSRect rect1;rect1.size.width = img1.size.width; rect1.size.height = img1.size.height;
  CGImageRef imageRef1 = [img1 CGImageForProposedRect:&amp;rect1 context:[NSGraphicsContext currentContext] hints:nil];
  CIImage *ciimage = [CIImage imageWithCGImage:imageRef1];
  </code></pre>
  
  <p>I have a function that applies a Core Image filter to a core image (<strong>CIImage</strong>), which I want to test.  And I want to add output image to a window as a subview.  So I need NSImage.  How can I convert this core image back into NSImage?  If I ask Google, I don't get good results.</p>
  
  <p>Thank you for your help.</p>