views:

56

answers:

1

I have an NSImage and want to replace one color in it with another (e.g. replace all the blue with a green colour) Is there an easy way to do this and if not, how could I get this functionality?

+1  A: 

This is a job for core image. Or, you can use use Quartz Composer to figure out your image filter, and embed a QCView in your app.

NSResponder
ok then how would I go about doing it via a CIImage?
Amy
You wouldn't, because a CIImage is just an image. You need to use a filter for this. See the documentation: http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CoreImageFilterReference/ http://developer.apple.com/mac/library/documentation/GraphicsImaging/Conceptual/CoreImaging/
Peter Hosey
is there a specific filter i should use or would i have to create one?
Amy