问题
I'm using GPUImage framework of Brad Larson in my app and I need to make a mask of mask.jpg and photo. So mask images are two colors images with black background and white geometric figure. So basically masking is working, the problem is that I can't make the transparency of mask. To make that I need to replace the black color of mask.png to lighter color (more gray to white).
So I tried to use code from here
Want to change a particular color inside an image with another color - iPhone
But it doesn't work, the alpha is set to 0 and I don't know why. I tried to debug and everything seems to be fine, but it returns an UIImage with transparent color instead of black color.
Is there a way to make it without coregraphics. Maybe coreimage?
来源:https://stackoverflow.com/questions/18452808/gpuimage-masking-transparency