keep only the black color or other color

How to keep only the black color of the picture
Other colors become transparent?

Hi @purpleMoon

May be use Masking Images.

Have a nice day:)
ldurniat

You must use shaders.

I don’t know much about it, but this should work:


local kernel = {}

kernel.language = "glsl"
kernel.category = "filter"
kernel.name = "blackening"

kernel.fragment =
[[
P_COLOR vec4 FragmentKernel( P_UV vec2 texCoord )
{
    P_COLOR vec4 texColor = texture2D( CoronaSampler0, texCoord );
    float alpha = texColor.a - float (texColor.rgb);
    return CoronaColorScale(vec4(0,0,0,alpha));
}
]]

graphics.defineEffect( kernel ) 

And then you should just apply the filter to whatever you want

object.fill.effect = "filter.custom.blackening"

Maybe there is a better way to implement that shader, but that is the best I can do for now.

Thank you for the information
Have a nice day

I will study
Thanks for your guidance
have a nice day