ImageEn, unit iexProcEffects

TIEImageEffectsList.Create

TIEImageEffectsList.Create


Declaration

constructor Create(Owner: TIEBitmap = nil);


Description

Create a new TIEImageEffectsList object.



See also: TIEImageEffect


Example

// Save an effects chain to file
var
  opList: TIEImageEffectsList;
  op: TIEImageEffect;
begin
  opList := TIEImageEffectsList.Create();
  op := TIEImageEffect.Create();
  try
    // Reduce size by half
    op.Operation            := peResize;
    op.Resize_Width         := 50;
    op.Resize_Height        := 50;
    op.Resize_ByPercent     := True;
    op.Resize_QualityFilter := rfLanczos3;
    opList.Add( op );

    // Enhance contrast
    op.Operation         := peContrast;
    op.Contrast_Contrast := 20;
    opList.Add( op );

    // Rotate 45 deg. clockwise
    op.Operation              := peRotate;
    op.Rotate_Angle           := -45;
    op.Rotate_BackgroundColor := clBlack;
    op.Rotate_Antialias       := ierFast;
    opList.Add( op );

    opList.SaveToFile( 'D:\Effects.chain' );
  finally
    opList.Free;
    op.Free;
  end;
end;

// Apply effects in a chain file to current image
ImageEnView1.IEBitmap.EffectsChain.Enabled := True;
ImageEnView1.IEBitmap.EffectsChain.LoadFromFile( 'D:\Effects.chain' );
ImageEnView1.IEBitmap.EffectsChain.Apply();