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



Dear Pierre-Oliver,

First let me say thanks for all of the great help you've been providing. Indeed, the fix you described

There is a typo in the technote sample code: it should read:

[[NSBitmapImageRep alloc] initWithFocusedViewRect:...

Solved the crash in my test application (which is built on AppKit in XCode).

But now, when I the same exact code

NSSize imageSize = [nsImage size];
[nsImage lockFocus];
NSBitmapImageRep* bitmapImage = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0, 0, imageSize.width, imageSize.height)];
[nsImage unlockFocus];


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

in my Carbon/MachO/C++ application (which I'm building with CodeWarrior) it crashes. (Note that I'm creating an Auto Release Pool before this code... so I don't think that has anything to do with the problem.)

I have this sneaking suspicion that because my application isn't built on top of AppKit, that that I'm not going to be able to lock the focus on the NSImage. (CodeWarrior isn't as nice as XCode, in that all I can tell about the call chain during the crash is that I'm about a dozen levels deep into AppKit and three levels deep into Foundation when the crash occurs.)

If you have further ideas, I'd appreciate them, as everything is working except for converting the NSImage into a CIImage so that I can feed it to other CoreImage plugins.

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>)
 >Re: 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.