开发者

In Cocoa, how do you apply a QuartzComposer patch effect to an NSImage?

I'm not trying to create a series of QC effects, I just want to use 开发者_StackOverflow中文版the Tracer effect. Do I have to create the QC thing and then apply that, or can I call it directly in Cocoa?


There are several ways to do this, depending on what you want to do with the resulting image. The simplest thing is to just include a QCView into your UI, and run whatever composition you want inside of it. If you want to operate on images and save the results, then you probably want to use CoreImage filters.

There's a handy list of CoreImage filters here:

http://developer.apple.com/macosx/coreimage.html


This web page gives some instructions on how to convert from NSImage to CIImage and do the scaling:

http://gigliwood.com/weblog//Cocoa/Core_Image__Practic.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜