I'm creating a mask based on DeviceGray color space based image.
What basically I want to do is to change all sorts of gray (beside black) pixels into white and leave black pixels as they are.
So I want my image to be consisted with black and white pixels.
Any idea how to achieve that using CoreGraphics means ?
Please dont offer running all over the pixels in the loop
Use
CGImageCreateWithMaskingColors
andCGContextSetRGBFillColor
together like this:By the way, the fill color is mentioned at the CGImageCreateWithMaskingColors discussion.