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?
views:
56answers:
1
+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
2010-01-22 19:45:54
ok then how would I go about doing it via a CIImage?
Amy
2010-01-22 19:53:50
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
2010-01-22 21:24:50
is there a specific filter i should use or would i have to create one?
Amy
2010-01-23 10:35:48