ImageEn, unit iexProcUI



TIEEditControls = class(TWinControl);


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.

 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)

// Or
// Reset our preview

2. Editing of an Image with Preview (Two ImageEnView)
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)

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 );


Demo  Demos\ImageEditing\EditControls_Embedded\EditControls.dpr
Demo  Demos\ImageEditing\EditControls_Dialog\EditControls.dpr
Demo  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

// 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;

Methods and Properties

Published Property  ActiveTab
Public Method  Apply
Public Method  ApplyEx
Public Method  ApplyTo
Published Property  AttachedOriginalImageEnView
Published Property  AttachedPreviewImageEnView
Published Property  ComboBoxShapeColor
Published Property  ComboBoxShowText
Published Property  EditingEnabled
Public Property  Frame
Published Property  LivePreview
Published Property  Heading
Public Property  OperationsLog
Published Property  PreviewEffects
Public Property  ProcessingParams
Public Method  Reset
Published Property  ShowHeading
Public Method  Update
Public Method  UpdatePreview


Event  OnChange
Event  OnCreate
Event  OnDestroy
Event  OnUpdate