How to tint an image ?

Thursday, October 07 2004 @ 06:42 AM UTC

Contributed by: cocoa

I'm working on a project that needs to take a bitmap image provided by the user and transform it so that it will print with a single color specified by the user.

Take a look at the NSBitmapImageRep documentation and the method colorizeByMappingGray:toColor:blackMapping:whiteMapping:
If you want more control you can still manipulate the pixels yourself, see the SGI for information about the theory.
Take a look at this example about accessing pixels of a NSBitmapImageRep.