I got a black and white image from the edge detection filter in GPUImage, where white represents the edges, and the majority of the image contents is black, nontransparent. The problem is, I want to overlay this image on top of another image, to show how the edges are aligned with the image below.
But the non-edge area is not transparent but black, so basically I want the black to be transparent, or changing the intensity of blackness and whiteness to the intensity of transparency.
I did not find a direct GPUImage filter for this conversion task. GPUImageChromaKeyFilter seems to be a way of doing this, but it's more than RGB to Alpha channel conversion, and is not intended for this task.