dxShowImageEditor(TPicture) Method
Invokes the Image Editor dialog for the specified TPicture image container.
#Declaration
#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 |
#Returns
Type | Description |
---|---|
Boolean |
|
#Remarks
Image Editor is a modal dialog that allows users to perform simple image edit operations, such as cropping, rotation, and color adjustment.
#Image Edit Operations
The Image Editor displays the following commands:
- Crop
A click on the Crop button displays the Crop operation pane and a crop box with sizing handles in the image display area.
- 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.
- 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:
Tip
You can use an image editor‘s Properties.
The Edit… menu item is available only if the pmi
#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.