GPUImage masking transparency
Asked Answered
M

0

1

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?

Medalist answered 26/8, 2013 at 20:51 Comment(1)
The real solution is not to replace a color but to actually use an input video that has already been split into RGB and Alpha channels. For example, see https://mcmap.net/q/1328843/-ios-overlaying-alpha-channel-video-on-another-videoImpressionable

© 2022 - 2024 — McMap. All rights reserved.