Fix bluescreen0r overwrites input alpha

Fixes https://github.com/mltframework/shotcut/issues/1745
and
https://forum.shotcut.org/t/chroma-key-turns-anything-not-behind-it-
black/50087
This commit is contained in:
Dan Dennedy
2025-11-06 19:38:49 -08:00
committed by Jaromil
parent 697fc9b2a5
commit 40a50bec63

View File

@@ -83,7 +83,7 @@ public:
*outpixel= (*pixel & 0x00FFFFFF); // copy all except alpha
uint32_t d = distance(*pixel); // get distance
unsigned char a = 255; // default alpha
unsigned char a = (*pixel >> 24); // default alpha
if (d < distInt) {
a = 0;
if (d > distInt2) {
@@ -100,5 +100,8 @@ public:
};
frei0r::construct<bluescreen0r> plugin("bluescreen0r", "Color to alpha (blit SRCALPHA)", "Hedde Bosman",0,4,F0R_COLOR_MODEL_RGBA8888);
frei0r::construct<bluescreen0r> plugin("bluescreen0r",
"Color to alpha (blit SRCALPHA)",
"Hedde Bosman",
0, 5,
F0R_COLOR_MODEL_RGBA8888);