[Cin] Color erase like GIMP

Stefan de Konink stefan at konink.de
Sun Sep 26 01:38:56 CEST 2021


Background:

I have created an animation with animejs, using some SVG images. Not 
knowing how I could render those I have done a screen capture using ffmpeg 
on a green background. Suggestions on which renderer would be capable in 
rendering on top an transparent surface would be interesting.


What I want:

What I would like to achieve is to use the green channel as alpha mask, but 
it should also do partial transparency while maintaining the input color.


Within GIMP I am able to apply color-erase to replace the green background 
to transparency, ImageMagick is not able to do it. Cinelerra and ffmpeg 
also seem to mask, but not subtract. An alternative script is capable of 
creating an alpha for green, but not keeping the original input white, like 
GIMP.

In ./app/operations/layer-modes/gimpoperationlayermode-blend.c the function 
gimp_operation_layer_mode_blend_color_erase describes the inner working.


Could anyone suggest how to achieve this within Cinelerra or first with an 
external tool?

-- 
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: input.png
Type: image/png
Size: 25235 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210926/3fc28d77/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: color-erase.png
Type: image/png
Size: 28044 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210926/3fc28d77/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: magick.png
Type: image/png
Size: 25875 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210926/3fc28d77/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagemagick.png
Type: image/png
Size: 28697 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210926/3fc28d77/attachment-0007.png>


More information about the Cin mailing list