You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Added a simple chroma key method to a frame object, and added multi-threaded optimizations to the black magic capture code.
This commit is contained in:
@@ -396,6 +396,19 @@ int Frame::GetWidth()
|
||||
return image->columns();
|
||||
}
|
||||
|
||||
// Make colors in a specific range transparent
|
||||
void Frame::TransparentColors(string color, double fuzz)
|
||||
{
|
||||
// Make this range of colors transparent
|
||||
image->colorFuzz(fuzz * 65535 / 100.0);
|
||||
image->transparent(Magick::Color(color));
|
||||
image->colorFuzz(0);
|
||||
|
||||
//image->quantumOperator(Magick::OpacityChannel, Magick::UndefinedEvaluateOperator, "K0*b − K1*g + K2");
|
||||
//image->fx("g-2*b+1");
|
||||
//K0*b − K1*g + K2
|
||||
}
|
||||
|
||||
// Save the frame image to the specified path. The image format is determined from the extension (i.e. image.PNG, image.JPEG)
|
||||
void Frame::Save(string path, float scale)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user