I am looking for a simple and efficient way to give a special tint to any icon contained in an NSImage. My initial need id to have sepia icons but if can use other colors it is better.
Do you have any idea to achieve this?
Thanks in advance for your help,
Regards,
I think you will have take image pixel by pixel and adjust rgb values to get the effect.
Code is shamelessly copied from this SO thread , and it talks about applying sepia filter to UIImage instead of NSImage, but logic can be reused..Also this thread is one of the best when it comes to image processing..One to bookmark..
Edit: As Josh Caswell pointed out, Core Image can be used to create sepia image and some image filtering..So easier method should be to use core Image…Read his answer on how to do it..This method works fine too, especially in iphone where there is no coreImage framework..