
Contents |
Contrast
Adjust contrast of image
1. imgContrast a:=20;
2. imgContrast a:=-20 img:=mat(1) oimg:=mat(2);
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Adjustment | a |
Input double | |
Specifies the amount of contrast change. The valid range is [-100, +100]. |
| Input Matrix | img |
Input Image | |
Specifies the source image to be manipulated. The default input is the active image. |
| Output Image | oimg |
Output Image | |
Specify the output image. By default, the output image is the same as the input image. See the syntax here. |
The imgContrast function increases or decreases the contrast of a bitmap image. To increase the contrast, enter a positive value for the amount variable; otherwise, enter a negative amount to decrease the contrast. The absolute amount of the amount variable determines the amount of contrast change.
In this example, we use the imgContrast function to increase the contrast of the input image with the Adjustment value as 20:

For more examples, please refer to XF Script Dialog (press F11).
The computation uses L_ChangeBitmapContrast() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_ChangeBitmapContrast topic.
LEADTOOLS Main API Help file, Version 14