ImageEn, unit iexProcEffects |
|
TIEImageEffectsList.CurrentItem
Declaration
property CurrentItem: TIEImageEffect;
Description
Return the last added item.
This makes it easier to set properties for an added item.
Note: If a
TImageEnView is being used, you MUST call ImageEnView1.Update() after setting properties for an item
// Add a rotation effect to the image chain
ImageEnView1.IEBitmap.EffectsChain.Add( peRotate );
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Rotate_Angle := 90;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Rotate_Antialias := ierBicubic;
ImageEnView1.Update(); // Must call update after manually setting properties
// Add a horizontal flip
ImageEnView1.IEBitmap.EffectsChain.Add( peRotate ); // Rotation and flipping type
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Flip_Horz := True;
ImageEnView1.Update(); // Must call update after manually setting properties
// Add an operation to resize image to 1000x1000 (maintaining aspect ratio)
ImageEnView1.IEBitmap.EffectsChain.Add( peResize );
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Resize_Width := 1000;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Resize_Height := 1000;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Resize_ByPercent := False;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Resize_QualityFilter := rfLanczos3;
ImageEnView1.Update(); // Must call update after manually setting properties
// Add an operation to add a 5 pixel black border to the image
ImageEnView1.IEBitmap.EffectsChain.Add( peCrop ); // We will do a negative crop
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Crop_Left := -5;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Crop_Top := -5;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Crop_Right := -5;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Crop_Bottom := -5;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Crop_BackgroundColor := clBlack;
ImageEnView1.Update(); // Must call update after manually setting properties