mirror of
https://github.com/dyne/frei0r.git
synced 2025-12-05 14:19:59 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user