Hello,
I am using following code to Chromakey an image
ResetChromaKeyImage();
// Resize background to match foreground layer if it smaller
w := imax(ImageEnView1.Layers[ 0 ].Bitmap.Width, ImageEnView1.Layers[ 1 ].Bitmap.Width );
h := imax(ImageEnView1.Layers[ 0 ].Bitmap.Height, ImageEnView1.Layers[ 1 ].Bitmap.Height );
ImageEnView1.Layers[ 0 ].Bitmap.Resample( w, h );
ImageEnView1.LayersCurrent := 1;
ImageEnView1.Proc.RemoveChromaKey( KeyColor,
trkTolerance.Position / 1000,
trkSaturation.Position,
updEdgeFeather.Position,
cmbHueReduction.ItemIndex,
chkRemoveNoise.Checked );
ImageEnView1.Update();
ProgressBar1.Visible := False;
After the unwanted background is removed I want to actually select the boundary of what remains of the image and create a mask from it as well as crop the layer so that its size is according to the what is left.
TIA
Yogi Yang