ChromaKeyFilter Class
Adds transparency to the pixels of a specific color.
Namespace: Lumia.Imaging.Compositing
Assembly: Lumia.Imaging (in Lumia.Imaging.dll) Version: 255.255.255.255
Syntax
public sealed class ChromaKeyFilter : IFilter,
__IChromaKeyFilterPublicNonVirtuals
'Declaration
Public NotInheritable Class ChromaKeyFilter
Implements IFilter, __IChromaKeyFilterPublicNonVirtuals
public ref class ChromaKeyFilter sealed : IFilter,
__IChromaKeyFilterPublicNonVirtuals
Lumia.Imaging.Compositing.ChromaKeyFilter = function();
Type.createClass(
'Lumia.Imaging.Compositing.ChromaKeyFilter',
null,
Lumia.Imaging.IFilter,
Lumia.Imaging.Compositing.__IChromaKeyFilterPublicNonVirtuals);
Examples
using (var filterEffect = new FilterEffect(source))
using (var blendEffect = new BlendEffect(backgroundSource, filterEffect, BlendFunction.Normal, 1.0))
{
filterEffect.Filters = new IFilter[] {new ChromaKeyFilter(Windows.UI.Color.FromArgb(255,108,152,75 ), 0.2, 0, false)};
// Create a target where the filtered image will be rendered to
var target = new WriteableBitmap(width, height);
// Create a new renderer which outputs WriteableBitmaps
using (var renderer = new WriteableBitmapRenderer(blendEffect, target))
{
await renderer.RenderAsync();
// Set the output image to Image control as a source
ImageControl.Source = target;
await SaveEffectAsync(blendEffect, "ChromaKeyFilter.jpg", outputImageSize);
}
}
Inheritance Hierarchy
System.Object
Lumia.Imaging.Compositing.ChromaKeyFilter
Version Information
Lumia Imaging SDK
Supported in: 2.0