ChromaKeyFilter Class

Adds transparency to the pixels of a specific color.
Dn899575.ChromaKeyFilter(en-us,WIN.10).jpg

Namespace: Lumia.Imaging.Compositing
Assembly: Lumia.Imaging (in Lumia.Imaging.dll) Version: 255.255.255.255

Lumia.Imaging.Compositing.ChromaKeyFilter = function();

Type.createClass(
	'Lumia.Imaging.Compositing.ChromaKeyFilter',
	null,
	Lumia.Imaging.IFilter,
	Lumia.Imaging.Compositing.__IChromaKeyFilterPublicNonVirtuals);

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);
    }
}

System.Object
  Lumia.Imaging.Compositing.ChromaKeyFilter

Lumia Imaging SDK

Supported in: 2.0
Show: