ImageEn, unit imageenproc




function DoPreviews(pe: TPreviewEffects = [peAll]; IsResizeable: Boolean = true; FormWidth : Integer = -1; FormHeight : Integer = -1; FormLeft : Integer = -1; FormTop: Integer = -1): Boolean;


Executes the Image Processing dialog to allow the user to perform various color and image manipulation functions upon the image.

Parameter Description
pe The set of effects to show in the dialog. You may wish to use [peAll], or one of the constants for editing, color adjustment and effect sets: ppeColorAdjustments, ppeEditingFunctions or ppeSpecialEffects
IsResizeable If true, the user can enlarge the dialog
FormWidth/FormHeight The initial size of the form. -1 = default value. The default size is controlled by TIPDialogParams.DialogWidth and TIPDialogParams.DialogHeight
FormLeft/FormTop The initial form position. -1 = default value. The default position is centered and controlled by TIPDialogParams.DialogLeft and TIPDialogParams.DialogTop

- To assign default values, read user specified values or persist values between sessions, use TIPDialogParams
- For peRotate DefaultRotateAntiAlias specifies whether anti-alias is used
- For peResize DefaultResampleFilter specifies the resampling filter that it used to improve the quality
- peSoftShadow is not available if you have not enabled the alpha channel
- The language used in the dialog is controlled by MsgLanguage. The styling can also be adjusted using UseButtonGlyphsInDialogs
- Most color effects (those in ppeColorAdjustments) have no effect with 1bit images (even though changes may be shown in the preview if a quality sample is in use)


Demo  Demos\ImageEditing\CompleteEditor\PhotoEn.dpr
Demo  Demos\Other\ImageEn_Dialogs\ImageEn_Dialogs.dpr


// Prompt to allow all editing and color adjustment on the current image
ImageEnView1.Proc.DoPreviews( [ peAll ] );

// Prompt to perform color adjustment on the current image
ImageEnView1.Proc.DoPreviews( ppeColorAdjustments );

// Prompt to perform image effects on the current image
ImageEnView1.Proc.DoPreviews( ppeSpecialEffects );

// Prompt to edit the current image
ImageEnView1.Proc.DoPreviews( ppeEditingFunctions );

ImageEnView1.Proc.PreviewsParams := ImageEnView1.Proc.PreviewsParams + [ prppDefaultLockPreview ]; // Default to preview
ImageEnView1.Proc.DoPreviews( [ peContrast, peUserFilt ] ); // Show contrast and user filters

// Prompt for image editing functions with best quality output
IEGlobalSettings().DefaultRotateAntiAlias := ierBicubic;
IEGlobalSettings().DefaultResampleFilter := rfLanczos3;
ImageEnView1.Proc.DoPreviews( ppeEditingFunctions );

// Display Effects Dialog with state saved between sessions
if FileExists( 'D:\State.dat' ) then
  ImageEnView1.Proc.IPDialogParams.LoadFromFile( 'D:\State.dat' );
ImageEnView1.Proc.DoPreviews( ppeSpecialEffects );
ImageEnView1.Proc.IPDialogParams.SaveToFile( 'D:\State.dat' );

See Also

Public Property  IPDialogParams
Published Property  PreviewFont
Published Property  PreviewFontEnabled
Public Property  PreviewsLog
Published Property  PreviewsParams