Any idea why this image masking code does not work?
问题 I have this code to mask an image. Basically, I only work with PNG images. So I have a 300x400 PNG image with 24bits of color (PNG-24). I am not sure if it also has an alpha channel. But there's no transparency in it. Then, there is the image mask which is PNG-8bit without alpha channel. It is just black, grayscale and white. I create both images as UIImage. Both display correctly when putting them into an UIImageView. Then I create an UIImage out of them which contains the results of the