ImageEn, unit imageenview

TImageEnView.SelectionIntensity

TImageEnView.SelectionIntensity


Declaration

property SelectionIntensity: Integer;


Description

Specifies the selection intensity and is valid only when the SelectionMaskDepth is 8 (8 bit), otherwise it must be 1.
You can assign a value from 0 to 255 which will be applied to the next or current selection.

See also: SelectionMaskDepth.


Demo

Demo  Demos\ImageEditing\SoftSelections\SoftSel.dpr


Examples

// Apply negative effect at 50% intensiry
ImageEnView1.SelectionMaskDepth := 8;
ImageEnView1.SelectionIntensity := 128;  // 128=50% selected
ImageEnView1.Select( 10, 10, 100, 100 );
ImageEnView1.Proc.Negative();




// Make a gradient selection (increasing from unselected to fully selected along height of image)
// Then convert selection to gray scale
ImageEnView1.Deselect();
ImageEnView1.SelectionMaskDepth := 8;
for Y := 0 to ImageEnView1.IEBitmap.Height - 1 do
  for X := 0 to ImageEnView1.IEBitmap.Width - 1 do
  begin
    selIntensity := Round( Y / ImageEnView1.IEBitmap.Height * 255 );
    ImageEnView1.SelectionMask.SetPixel( X, Y, selIntensity );
  end;
ImageEnView1.SelectCustom;
ImageEnView1.Proc.ConvertToGray();
ImageEnView1.Deselect();




See Also

 SelectionMask
 SelectionMaskDepth