Properties · Methods · Events · Demos · Examples
Declaration
TIEEditControls = class(TWinControl);
Description
TIEEditControls provides a UI for many of the editing and effect methods of
TImageEnProc. It can be embedded in a form to quickly add image editing functionality to your application.
It is also available as a pre-built dialog by calling
DoPreviews. There are
twenty-five editing functions available.
Note:
◼TIEEditControls can be
localized by setting
MsgLanguage
◼If you display a single effect, e.g. [peRotate], the tabs will be automatically hidden
Modes of TIEEditControls
TIEEditControls can operate in three modes:
1. Direct Editing of an Image (Single ImageEnView)
In this mode, any editing changes you make will be applied directly to your image.
// Set up
IEEditControls1.AttachedOriginalImageEnView := ImageEnView1;
IEEditControls1.AttachedPreviewImageEnView := nil;
// Apply changes (even though they are previewed on the image, call Apply to lock them in)
IEEditControls1.Apply();
// Or
// Reset our preview
IEEditControls1.Reset();
2. Editing of an Image with Preview (Two ImageEnViews)
In this mode, any editing changes are shown in a separate Preview ImageEnView and you must call
Apply to apply the effect to the original image.
// Set up
IEEditControls1.AttachedOriginalImageEnView := ImageEnViewOriginal;
IEEditControls1.AttachedPreviewImageEnView := ImageEnViewPreview;
// Apply changes to the original image (in ImageEnViewOriginal)
IEEditControls1.Apply();
3. Editing Controls only without Preview (No ImageEnViews)
In this mode, the component is only used for setting editing effects. They are not shown in an ImageEnView. Use
ApplyTo to apply the effect to a bitmap.
Note: In this configuration some tabs do not display fully, such as FFT and Equalization
// Set up
IEEditControls1.AttachedOriginalImageEnView := nil;
IEEditControls1.AttachedPreviewImageEnView := nil;
// Apply effect to a bitmap
IEEditControls1.ApplyTo( ImageEnView1.IEBitmap );
| Demos\ImageEditing\EditControls_Embedded\EditControls.dpr |
| Demos\ImageEditing\EditControls_Dialog\EditControls.dpr |
| Demos\Other\AllComps\AllComponents.dpr |
// Load a new image into the attached ImageEnView
ImageEnView1.IO.LoadFromFile( 'D:\Image.jpg' );
IEEditControls1.Update( iecuUpdateControls ); // Update controls for new image
// Set editing controls to Rotation of 45 deg.
IEEditControls1.ProcessingParams.Operation := peRotate;
IEEditControls1.ProcessingParams.Rotate_Angle := 45;
IEEditControls1.Update( iecuReadSettings ); // Update controls to match ProcessingParams
// Apply changes
IEEditControls1.Apply();
// Show image editing effects and default to rotation
IEEditControls1.PreviewEffects := ppeEditingFunctions;
IEEditControls1.ActiveTab := peRotate;
// Show only the rotation function (no tabs)
IEEditControls1.PreviewEffects := [peRotate];
// Show all available editing functions
IEEditControls1.PreviewEffects := [peAll];
// Show color adjustment effects
IEEditControls1.PreviewEffects := ppeColorAdjustments;
// Show special effects effects
IEEditControls1.PreviewEffects := ppeSpecialEffects;
Properties
Methods