I have a QC composition, using just a VideoInput and a Sprite.
The VideoInput's "Image" output is published.
I run this from a Cocoa app, rendering it into a QCView.
When I access the image using:
id anImage=[qcView valueForOutputKey:@"Image"];
...the object in anImage is an NSImage.
Is there any way to make it so I can get back a CIImage instead?
I just want to feed anImage into a CIFilter. I'm trying to avoid
using:
[CIImage imageWithData:[anImage TIFFRepresentation]]
Roland
Well, actually a QC Composition should probably return an NSImage
with a NSCIImageRep, so you could do something like this.
Here is a category on NSImage, which returns a CIImage, either from
the NSCIImageRep if one exists or by creating a new CIImage from
NSImage's bitmapRepresentation.