My question is if I have a Lion image just I want to change the color of the lion alone not the background color. For that I referred this SO question but it turns the color of whole image. Moreover the image is not looking great. I need the color change like photoshop. whether it is possible to do this in coregraphics or I have to use any other library.
EDIT : I need the color change to be like iQuikColor app
See answers below instead. Mine doesn't provide a complete solution.
Here is the sketch of a possible solution using OpenCV:
cvCvtColor
(we only want to change the hue).cvThreshold
specifying a certain tolerance (you want a range of colors, not one flat color).cvInRangeS
and use the resulting mask to apply the new hue.cvMerge
the new image with the new hue with an image composed by the saturation and brightness channels that you saved in step one.There are several OpenCV iOS ports in the net, eg: http://www.eosgarden.com/en/opensource/opencv-ios/overview/ I haven't tried this myself, but seems a good research direction.