cgimagemaskcreate

Why does my image mask make my image black, where the mask is white?

I have a 300 x 400 px PNG-24 with alpha channel. It's about 140kb. I want to mask out some parts of that, so I created another 300 x 400 image as PNG-24 but with only black, gray and white and no alpha channel. The weird thing is: Where the mask is black, the image is just kept original. No transparency. But where the mask is white, the...

Replace all white/nearly white pixels in a UIImage with alpha using CGImage?

Hi there, I have a UIImage with white background. I would like replace the white background/pixels with alpha-transparent pixels. I've looked at other questions on StackOverflow, along with Quartz documentation, but have yet to find a coherent "start-to-end" for this problem. How is this done? ...