I use the following code to make magenta transparent:
UIImage *inputImage = [UIImage imageWithData:UIImageJPEGRepresentation(anchorWithMask, 1.0)]; const float colorMasking[6] = {0.0, 255.0, 0.0, 2.0, 0.0, 255.0}; CGImageRef imageRef = CGImageCreateWithMaskingColors(inputImage.CGImage, colorMasking); UIImage *image = [UIImage imageWithCGImage:imageRef];
The result is an image with purple borders: http://i.imgur.com/4g6lM.png . Boundaries are present before adding an alpha channel, so it is not associated with this.
Is it possible to get rid of these boundaries?
source share