Skip to main content
All docs
V24.2

dxShowImageEditor(TPicture) Method

Invokes the Image Editor dialog for the specified TPicture image container.

Declaration

function dxShowImageEditor(APicture: TPicture): Boolean;

Parameters

Name Type Description
APicture TPicture

The target image container.

The invoked dialog applies pending changes to the stored image when the global function returns True.

Returns

Type Description
Boolean
  • True if a user clicks the Save button to close the Image Editor dialog or clicks the Yes button in the modal Close Editor dialog to confirm pending changes.
  • False if a user clicks the Close button or clicks the No button in the modal Close Editor dialog.

Remarks

Image Editor is a modal dialog that allows users to perform simple image edit operations, such as cropping, rotation, and color adjustment.

VCL Editors Library: An Image Editor Dialog Example

Image Edit Operations

The Image Editor displays the following commands:

VCL Editors Library: All Image Edit Operation Buttons

Crop

A click on the Crop button displays the Crop operation pane and a crop box with sizing handles in the image display area.

VCL Editors Library: The Crop Operation Pane

Desaturate

The Desaturate button makes the displayed image black-and-white (sets the Saturation of all image pixels to 0).

You can use the Saturation slider from the Adjust Colors pane for granular control over image saturation.

Adjust Colors

The Adjust Colors button displays the corresponding pane with Contrast, Brightness, and Saturation sliders.

VCL Editors Library: The Adjust Colors Operation Pane

Mirror
This button flips the displayed image horizontally.
Rotate Counterclockwise | Rotate Clockwise
These buttons rotate the displayed image by 90 degrees in the corresponding direction.
Undo | Redo
These buttons allow users to navigate the action history.

Invoke a Standalone Image Editor Dialog

To invoke the Image Editor dialog for a TPicture image container to allow users to edit the stored image, call the dxShowImageEditor global function.

Invoke the Image Editor Dialog in cxImage Editors

You can call the ShowImageEditor procedure of a TcxImage or TcxDBImage editor to allow users to edit the image displayed in the editor.

A user can click the Edit… item in the context menu of a TcxImage or TcxDBImage editor to invoke the Image Editor dialog for the editor:

VCL Editors Library: Invoke the Image Editor Dialog

Tip

You can use an image editor‘s Properties.PopupMenuLayout.MenuItems property to customize the list of context menu items.

The Edit… menu item is available only if the pmiEdit flag is present in the Properties.PopupMenuLayout.MenuItems property value. Refer to the TcxPopupMenuLayout.MenuItems property description for detailed information on menu item management and a code example.

Image Editor Customization

If you need to customize the Image Editor dialog, derive a custom form from the TdxCustomImageEditorDialog class. Then, assign a reference to the custom form to the dxImageEditorClass global variable.

See Also