Automation : Scripting Adjustments
Commands
All commands for transforms start with “adjust_”. Adjustments tend to be more difficult to script than other groups. Here’s the listing of the available commands and their syntax:
| Command & Syntax | Details |
|---|---|
| adjust_alpha point_list... sampling; |
Adjust alpha. The point list consists of a number (the "count") followed by "count" coordinate pairs, e.g. |
| adjust_autolevel linkage sampling; | Performs auto-leveling on the image. The parameter linkage [linked, independent] sets linkage while sampling [aque, flat] sets the sampling method. |
|
adjust_brightness adjust_brightness |
Adjusts brightness and contrast. Takes either 2+1 or 6+1 parameters depending on whether you want to adjust each channel separately or in groups. The first 2 or 6 parameters are the values [0..100] and the parameter sampling [aque, flat] sets the sampling method. |
| adjust_curves point_list_r... point_list_g... point_list_b... sampling; |
Adjust with curves. Each point list consists of a number (the "count") followed by "count" coordinate pairs, e.g. adjust_curves 3 0 0 128 128 255 255 3 0 0 128 128 255 255 3 0 0 128 128 255 255 aque ; The sampling [aque, flat] parameter sets the sampling method. |
adjust_greyscale |
Converts the image to greyscale with the option of adding a tint. The first three parameters specify contribution [0..100], the next three specify the colors (hues) for the tint [0..255], and the last three specify the tint intensity [0..100]. |
adjust_temperature |
Adjusts color temperature and tint. The first two parameters specify the bias applied to temperature and tint [0..100], and the sampling [aque, flat] parameter sets the sampling method. |
adjust_dodgeburn power sampling; |
Either dodges or burns the image depending on the power [-100..+100]. The sampling [aque, flat] parameter sets the sampling method. |
| adjust_histogram_eq; | Performs histogram equalization on the image. No parameters. |
adjust_huesat hue sat; adjust_huesat hue sat param; adjust_huesat hue sat param usage; |
Adjusts Hue, Saturation and Value/Lightness. The parameters are hue [-360..360], sat [-100..100] and, optionally, param [-100..100] and usage [value, lightness]. If param is not specified, it defaults to zero. The parameter usage specifies how param is interpreted; if it is not specified, it defaults to “value”. |
| adjust_levels in.lo.r in.lo.g in.lo.b in.hi.r in.hi.g in.hi.b out.lo.r out.lo.g out.lo.b out.mid.r out.mid.g out.mid.b out.hi.r out.hi.g out.hi.b; |
Adjusts input and output levels. Takes five sets of three parameters each [0..255]. The sets are: |
| adjust_channelmix elements ... ; | Mixes color channels . Takes a list of 20 elements representing a 5x4 matrix. The columns are input R, G, B, A and Offset, while the rows are output R, G, B and A. All values use 1.0 as 100%; e.g. adjust_channelmix 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 ; |