title: CoreImage: Create a CIImage with solid color and display it in NSImageView
body: <p>I want to programatically generate a rectangular image with a solid color fill.
  How can I do this?
  I want to populate inputImageView with inputImage.</p>
  
  <p>Here's my code so far, but all I get is an empty image view:</p>
  
  <pre><code>-(void) awakeFromNib{
    CIColor *red = [CIColor colorWithRed:1 green:0 blue:0];
    CIImage *redImage = [CIImage imageWithColor:red];
  
    NSCIImageRep *ir = [NSCIImageRep imageRepWithCIImage:redImage];
  
    [self setInputImage:[[NSImage alloc] initWithSize: NSMakeSize(25, 25)]];
    //magic should be happening right here!
    [[self inputImage] addRepresentation:ir];
    [[self inputView] setImage:[self inputImage]];
    [inputView setNeedsDisplay:YES];
  }
  </code></pre>