Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quartz Composer Output to OpenGL or CIFilter



It seems that Quartz Composer compositions output their images as NSImages.

I want to render this to an Open GL context, or be able to provide the output to a CIFilter as an NSImage.

I can't seem to find a good way to do either. Any suggestions?

This is not possible to retrieve an image from Quartz Composer using another format than an NSImage.

OK -- so I'm trying the following code to convert to a CIImage, for instance. But it crashes, unfortunately.


I'm using the code at the bottom of the page of TN2143 (http://developer.apple.com/technotes/tn2005/tn2143.html)

To wit:

NSSize            imageSize;
NSBitmapImageRep*  bitmapImage;

NSImage*  image = imgOut; // image from my qtz renderer

if(image) {
imageSize = [image size];
[image lockFocus];
bitmapImage = [[NSBitmapImageRep initWithFocusedViewRect:NSMakeRect(0, 0, size.width, size.height)];
[image unlockFocus];


CIImage* im = [[[CIImage alloc] initWithBitmapImageRep:bitmapImage] autorelease];
}


It crashes at the initWithFocusedViewRect method.

See the code at in my little test application at

http://www.troikatronix.com/files/MovieThruQuartz.sitx

The attempt to render is the GLMain.m file.

Best,
Mark

--
=====================================================================
Mark Coniglio, Artistic Co-Director | email@hidden
Troika Ranch Dance Theater          | http://www.troikaranch.org
=====================================================================
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >Quartz Composer Output to OpenGL or CIFilter (From: Mark Coniglio <email@hidden>)
 >Re: Quartz Composer Output to OpenGL or CIFilter (From: Pierre-Olivier Latour <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.