ImageEn, unit iexProcEffects |
|
TIEImageEffectsList.Apply
Declaration
procedure Apply(); overload;
procedure Apply(const EffectAsStr: string); overload; // Quick apply overload
Description
Permanently applies the
active effects to the image and
clears the list.
The second overload is a quick apply method. It applies the specified effect
as a string (and any
pending effects) even if the EffectsChain is not
enabled
Note:
◼Apply is only valid when the Effects Chain is attached to a TIEBitmap/TImageEnView
◼All effects are cleared after calling Apply()
| Demos\ImageEditing\EffectsChain\EffectsChain.dpr |
| Demos\InputOutput\BatchConvert\BatchConvert.dpr |
// Load an image
ImageEnView1.IO.LoadFromFile( 'D:\image.jpg' );
// Enable the effects chain
ImageEnView1.IEBitmap.EffectsChain.Enabled := True;
// Prompt the user to specify a color adjustment
ImageEnView1.IEBitmap.EffectsChain.Add( ppeColorAdjustments );
// 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
// Permanently apply specified effects to the image (will clear the effects from the chain)
ImageEnView1.IEBitmap.EffectsChain.Apply();
Quick Apply Example
// Apply RGB effect to image (EffectsChain does not need to be enabled)
// An exception is raised if the string is not a valid apply chain string
ImageEnView1.IEBitmap.EffectsChain.Apply( 'RGB/1/255/0/0' ); // Maximum red