开发者

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

开发者 https://www.devze.com 2022-12-11 22:32 出处:网络
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 Coc

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

精彩评论

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

关注公众号