Load a list of Image Processing effects (i.e. used to perform a set of operations upon an image).
Note: ◼LoadFromFile only works with files saved using SaveToFile ◼You do NOT need to call ImageEnView1.Update() after calling Delete(). It will update automatically
// Apply effects in a chain file to current image if OpenDialog1.Execute() then begin ImageEnView1.IEBitmap.EffectsChain.Enabled := True; ImageEnView1.IEBitmap.EffectsChain.LoadFromFile( OpenDialog1.FileName ); ImageEnView1.IEBitmap.EffectsChain.Apply(); end;
// Load effects chain from file and apply the effects to a list of images bmp := TIEBitmap.Create(); for i := 0 to ssFiles.Count - 1 do begin bmp.LoadFromFile( ssFiles[i] ); bmp.EffectsChain.Enabled := True; bmp.EffectsChain.LoadFromFile( 'D:\Effects.ieeff' ); bmp.EffectsChain.Apply(); bmp.SaveToFile( ChangeFileExt( ssFiles[i], '_convert.jpg' ); end; bmp.Free();
// 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 );
// 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();