GPUImage masking transparency

旧时模样 提交于 2020-01-16 04:42:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!