ImageEn, unit imageenview

TImageEnView.ChromaKeyOptions

TImageEnView.ChromaKeyOptions


Declaration

property ChromaKeyOptions: TIEChromaKeyOptions;


Description

Options for selection of images making use of a Chroma-Key background (e.g. green screen).

These options are used:
When calling SelectChromaKey
When MouseInteractGeneral includes miSelectChromaKey
When the Brush Tool is set to iebfSmartEraser

A ChromaKey image contains a solid color block that is removed so that it can be applied to a background. E.g. in the following image the key color is neon green (R=0/G=254/B=0).




Examples

// Select subject in image with green chroma-key background
ImageEnView1.ChromaKeyOptions.KeyColor := clGreen;
ImageEnView1.ChromaKeyOptions.Mode := iecSubject;
ImageEnView1.ChromaKeyOptions.Saturation := 35;
ImageEnView1.ChromaKeyOptions.Tolerance := 0.25;
ImageEnView1.SelectChromaKey();

// Use Smart Eraser Brush tool
ImageEnView1.ChromaKeyOptions.Tolerance := 0.15;
ImageEnView1.BrushTool.BrushFill := iebfSmartEraser;
ImageEnView1.MouseInteractGeneral := [ miBrushTool ];