When I use the following code:
UIImage *image=[UIImage imageNamed:@"loginf1.png"];
CGImageRef rawImageRef=image.CGImage;
const float colorMasking[6] = {222, 255, 222, 255, 222, 255};
CGImageRef maskedImageRef=CGImageCreateWithMaskingColors(rawImageRef, colorMasking);
maskedImageRef
is always nil. Why is this, and what can I do to correct this?