1512
return procedural_db_return_args (&threshold_proc, success);
1515
static ProcArg threshold_inargs[] =
1525
"The low threshold value: 0 <= low_threshold <= 255"
1530
"The high threshold value: 0 <= high_threshold <= 255"
1534
static ProcRecord threshold_proc =
1537
"Threshold the specified drawable.",
1538
"This procedures generates a threshold map of the specified drawable. All pixels between the values of 'low_threshold' and 'high_threshold' are replaced with white, and all other pixels with black.",
1539
"Spencer Kimball & Peter Mattis",
1540
"Spencer Kimball & Peter Mattis",
1548
{ { threshold_invoker } }
833
return gimp_procedure_get_return_values (procedure, success);
837
register_color_procs (GimpPDB *pdb)
839
GimpProcedure *procedure;
842
* gimp-brightness-contrast
844
procedure = gimp_procedure_new (brightness_contrast_invoker);
845
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-brightness-contrast");
846
gimp_procedure_set_static_strings (procedure,
847
"gimp-brightness-contrast",
848
"Modify brightness/contrast in the specified drawable.",
849
"This procedures allows the brightness and contrast of the specified drawable to be modified. Both 'brightness' and 'contrast' parameters are defined between -127 and 127.",
850
"Spencer Kimball & Peter Mattis",
851
"Spencer Kimball & Peter Mattis",
854
gimp_procedure_add_argument (procedure,
855
gimp_param_spec_drawable_id ("drawable",
859
GIMP_PARAM_READWRITE));
860
gimp_procedure_add_argument (procedure,
861
gimp_param_spec_int32 ("brightness",
863
"Brightness adjustment",
865
GIMP_PARAM_READWRITE));
866
gimp_procedure_add_argument (procedure,
867
gimp_param_spec_int32 ("contrast",
869
"Contrast adjustment",
871
GIMP_PARAM_READWRITE));
872
gimp_pdb_register_procedure (pdb, procedure);
873
g_object_unref (procedure);
878
procedure = gimp_procedure_new (levels_invoker);
879
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-levels");
880
gimp_procedure_set_static_strings (procedure,
882
"Modifies intensity levels in the specified drawable.",
883
"This tool allows intensity levels in the specified drawable to be remapped according to a set of parameters. The low/high input levels specify an initial mapping from the source intensities. The gamma value determines how intensities between the low and high input intensities are interpolated. A gamma value of 1.0 results in a linear interpolation. Higher gamma values result in more high-level intensities. Lower gamma values result in more low-level intensities. The low/high output levels constrain the final intensity mapping--that is, no final intensity will be lower than the low output level and no final intensity will be higher than the high output level. This tool is only valid on RGB color and grayscale images. It will not operate on indexed drawables.",
884
"Spencer Kimball & Peter Mattis",
885
"Spencer Kimball & Peter Mattis",
888
gimp_procedure_add_argument (procedure,
889
gimp_param_spec_drawable_id ("drawable",
893
GIMP_PARAM_READWRITE));
894
gimp_procedure_add_argument (procedure,
895
g_param_spec_enum ("channel",
897
"The channel to modify",
898
GIMP_TYPE_HISTOGRAM_CHANNEL,
899
GIMP_HISTOGRAM_VALUE,
900
GIMP_PARAM_READWRITE));
901
gimp_procedure_add_argument (procedure,
902
gimp_param_spec_int32 ("low-input",
904
"Intensity of lowest input",
906
GIMP_PARAM_READWRITE));
907
gimp_procedure_add_argument (procedure,
908
gimp_param_spec_int32 ("high-input",
910
"Intensity of highest input",
912
GIMP_PARAM_READWRITE));
913
gimp_procedure_add_argument (procedure,
914
g_param_spec_double ("gamma",
916
"Gamma correction factor",
918
GIMP_PARAM_READWRITE));
919
gimp_procedure_add_argument (procedure,
920
gimp_param_spec_int32 ("low-output",
922
"Intensity of lowest output",
924
GIMP_PARAM_READWRITE));
925
gimp_procedure_add_argument (procedure,
926
gimp_param_spec_int32 ("high-output",
928
"Intensity of highest output",
930
GIMP_PARAM_READWRITE));
931
gimp_pdb_register_procedure (pdb, procedure);
932
g_object_unref (procedure);
937
procedure = gimp_procedure_new (levels_auto_invoker);
938
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-levels-auto");
939
gimp_procedure_set_static_strings (procedure,
941
"This procedure is deprecated! Use 'gimp-levels-stretch' instead.",
942
"This procedure is deprecated! Use 'gimp-levels-stretch' instead.",
946
"gimp-levels-stretch");
947
gimp_procedure_add_argument (procedure,
948
gimp_param_spec_drawable_id ("drawable",
952
GIMP_PARAM_READWRITE));
953
gimp_pdb_register_procedure (pdb, procedure);
954
g_object_unref (procedure);
957
* gimp-levels-stretch
959
procedure = gimp_procedure_new (levels_stretch_invoker);
960
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-levels-stretch");
961
gimp_procedure_set_static_strings (procedure,
962
"gimp-levels-stretch",
963
"Automatically modifies intensity levels in the specified drawable.",
964
"This procedure allows intensity levels in the specified drawable to be remapped according to a set of guessed parameters. It is equivalent to clicking the \"Auto\" button in the Levels tool. This procedure is only valid on RGB color and grayscale images. It will not operate on indexed drawables.",
965
"Joao S.O. Bueno, Shawn Willden",
966
"Joao S.O. Bueno, Shawn Willden",
969
gimp_procedure_add_argument (procedure,
970
gimp_param_spec_drawable_id ("drawable",
974
GIMP_PARAM_READWRITE));
975
gimp_pdb_register_procedure (pdb, procedure);
976
g_object_unref (procedure);
981
procedure = gimp_procedure_new (posterize_invoker);
982
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-posterize");
983
gimp_procedure_set_static_strings (procedure,
985
"Posterize the specified drawable.",
986
"This procedures reduces the number of shades allows in each intensity channel to the specified 'levels' parameter.",
987
"Spencer Kimball & Peter Mattis",
988
"Spencer Kimball & Peter Mattis",
991
gimp_procedure_add_argument (procedure,
992
gimp_param_spec_drawable_id ("drawable",
996
GIMP_PARAM_READWRITE));
997
gimp_procedure_add_argument (procedure,
998
gimp_param_spec_int32 ("levels",
1000
"Levels of posterization",
1002
GIMP_PARAM_READWRITE));
1003
gimp_pdb_register_procedure (pdb, procedure);
1004
g_object_unref (procedure);
1009
procedure = gimp_procedure_new (desaturate_invoker);
1010
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-desaturate");
1011
gimp_procedure_set_static_strings (procedure,
1013
"Desaturate the contents of the specified drawable.",
1014
"This procedure desaturates the contents of the specified drawable. This procedure only works on drawables of type RGB color.",
1015
"Spencer Kimball & Peter Mattis",
1016
"Spencer Kimball & Peter Mattis",
1019
gimp_procedure_add_argument (procedure,
1020
gimp_param_spec_drawable_id ("drawable",
1024
GIMP_PARAM_READWRITE));
1025
gimp_pdb_register_procedure (pdb, procedure);
1026
g_object_unref (procedure);
1029
* gimp-desaturate-full
1031
procedure = gimp_procedure_new (desaturate_full_invoker);
1032
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-desaturate-full");
1033
gimp_procedure_set_static_strings (procedure,
1034
"gimp-desaturate-full",
1035
"Desaturate the contents of the specified drawable, with the specified formula.",
1036
"This procedure desaturates the contents of the specified drawable, with the specified formula. This procedure only works on drawables of type RGB color.",
1041
gimp_procedure_add_argument (procedure,
1042
gimp_param_spec_drawable_id ("drawable",
1046
GIMP_PARAM_READWRITE));
1047
gimp_procedure_add_argument (procedure,
1048
g_param_spec_enum ("desaturate-mode",
1050
"The formula to use to desaturate",
1051
GIMP_TYPE_DESATURATE_MODE,
1052
GIMP_DESATURATE_LIGHTNESS,
1053
GIMP_PARAM_READWRITE));
1054
gimp_pdb_register_procedure (pdb, procedure);
1055
g_object_unref (procedure);
1060
procedure = gimp_procedure_new (equalize_invoker);
1061
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-equalize");
1062
gimp_procedure_set_static_strings (procedure,
1064
"Equalize the contents of the specified drawable.",
1065
"This procedure equalizes the contents of the specified drawable. Each intensity channel is equalizeed independently. The equalized intensity is given as inten' = (255 - inten). Indexed color drawables are not valid for this operation. The 'mask_only' option specifies whether to adjust only the area of the image within the selection bounds, or the entire image based on the histogram of the selected area. If there is no selection, the entire image is adjusted based on the histogram for the entire image.",
1066
"Spencer Kimball & Peter Mattis",
1067
"Spencer Kimball & Peter Mattis",
1070
gimp_procedure_add_argument (procedure,
1071
gimp_param_spec_drawable_id ("drawable",
1075
GIMP_PARAM_READWRITE));
1076
gimp_procedure_add_argument (procedure,
1077
g_param_spec_boolean ("mask-only",
1079
"Equalization option",
1081
GIMP_PARAM_READWRITE));
1082
gimp_pdb_register_procedure (pdb, procedure);
1083
g_object_unref (procedure);
1088
procedure = gimp_procedure_new (invert_invoker);
1089
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-invert");
1090
gimp_procedure_set_static_strings (procedure,
1092
"Invert the contents of the specified drawable.",
1093
"This procedure inverts the contents of the specified drawable. Each intensity channel is inverted independently. The inverted intensity is given as inten' = (255 - inten). Indexed color drawables are not valid for this operation.",
1094
"Spencer Kimball & Peter Mattis",
1095
"Spencer Kimball & Peter Mattis",
1098
gimp_procedure_add_argument (procedure,
1099
gimp_param_spec_drawable_id ("drawable",
1103
GIMP_PARAM_READWRITE));
1104
gimp_pdb_register_procedure (pdb, procedure);
1105
g_object_unref (procedure);
1108
* gimp-curves-spline
1110
procedure = gimp_procedure_new (curves_spline_invoker);
1111
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-curves-spline");
1112
gimp_procedure_set_static_strings (procedure,
1113
"gimp-curves-spline",
1114
"Modifies the intensity curve(s) for specified drawable.",
1115
"Modifies the intensity mapping for one channel in the specified drawable. The drawable must be either grayscale or RGB, and the channel can be either an intensity component, or the value. The 'control_pts' parameter is an array of integers which define a set of control points which describe a Catmull Rom spline which yields the final intensity curve. Use the 'gimp-curves-explicit' function to explicitly modify intensity levels.",
1116
"Spencer Kimball & Peter Mattis",
1117
"Spencer Kimball & Peter Mattis",
1120
gimp_procedure_add_argument (procedure,
1121
gimp_param_spec_drawable_id ("drawable",
1125
GIMP_PARAM_READWRITE));
1126
gimp_procedure_add_argument (procedure,
1127
g_param_spec_enum ("channel",
1129
"The channel to modify",
1130
GIMP_TYPE_HISTOGRAM_CHANNEL,
1131
GIMP_HISTOGRAM_VALUE,
1132
GIMP_PARAM_READWRITE));
1133
gimp_procedure_add_argument (procedure,
1134
gimp_param_spec_int32 ("num-points",
1136
"The number of values in the control point array",
1138
GIMP_PARAM_READWRITE));
1139
gimp_procedure_add_argument (procedure,
1140
gimp_param_spec_int8_array ("control-pts",
1142
"The spline control points: { cp1.x, cp1.y, cp2.x, cp2.y, ... }",
1143
GIMP_PARAM_READWRITE));
1144
gimp_pdb_register_procedure (pdb, procedure);
1145
g_object_unref (procedure);
1148
* gimp-curves-explicit
1150
procedure = gimp_procedure_new (curves_explicit_invoker);
1151
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-curves-explicit");
1152
gimp_procedure_set_static_strings (procedure,
1153
"gimp-curves-explicit",
1154
"Modifies the intensity curve(s) for specified drawable.",
1155
"Modifies the intensity mapping for one channel in the specified drawable. The drawable must be either grayscale or RGB, and the channel can be either an intensity component, or the value. The 'curve' parameter is an array of bytes which explicitly defines how each pixel value in the drawable will be modified. Use the 'gimp-curves-spline' function to modify intensity levels with Catmull Rom splines.",
1156
"Spencer Kimball & Peter Mattis",
1157
"Spencer Kimball & Peter Mattis",
1160
gimp_procedure_add_argument (procedure,
1161
gimp_param_spec_drawable_id ("drawable",
1165
GIMP_PARAM_READWRITE));
1166
gimp_procedure_add_argument (procedure,
1167
g_param_spec_enum ("channel",
1169
"The channel to modify",
1170
GIMP_TYPE_HISTOGRAM_CHANNEL,
1171
GIMP_HISTOGRAM_VALUE,
1172
GIMP_PARAM_READWRITE));
1173
gimp_procedure_add_argument (procedure,
1174
gimp_param_spec_int32 ("num-bytes",
1176
"The number of bytes in the new curve (always 256)",
1178
GIMP_PARAM_READWRITE));
1179
gimp_procedure_add_argument (procedure,
1180
gimp_param_spec_int8_array ("curve",
1182
"The explicit curve",
1183
GIMP_PARAM_READWRITE));
1184
gimp_pdb_register_procedure (pdb, procedure);
1185
g_object_unref (procedure);
1188
* gimp-color-balance
1190
procedure = gimp_procedure_new (color_balance_invoker);
1191
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-color-balance");
1192
gimp_procedure_set_static_strings (procedure,
1193
"gimp-color-balance",
1194
"Modify the color balance of the specified drawable.",
1195
"Modify the color balance of the specified drawable. There are three axis which can be modified: cyan-red, magenta-green, and yellow-blue. Negative values increase the amount of the former, positive values increase the amount of the latter. Color balance can be controlled with the 'transfer_mode' setting, which allows shadows, mid-tones, and highlights in an image to be affected differently. The 'preserve-lum' parameter, if TRUE, ensures that the luminosity of each pixel remains fixed.",
1196
"Spencer Kimball & Peter Mattis",
1197
"Spencer Kimball & Peter Mattis",
1200
gimp_procedure_add_argument (procedure,
1201
gimp_param_spec_drawable_id ("drawable",
1205
GIMP_PARAM_READWRITE));
1206
gimp_procedure_add_argument (procedure,
1207
g_param_spec_enum ("transfer-mode",
1210
GIMP_TYPE_TRANSFER_MODE,
1212
GIMP_PARAM_READWRITE));
1213
gimp_procedure_add_argument (procedure,
1214
g_param_spec_boolean ("preserve-lum",
1216
"Preserve luminosity values at each pixel",
1218
GIMP_PARAM_READWRITE));
1219
gimp_procedure_add_argument (procedure,
1220
g_param_spec_double ("cyan-red",
1222
"Cyan-Red color balance",
1224
GIMP_PARAM_READWRITE));
1225
gimp_procedure_add_argument (procedure,
1226
g_param_spec_double ("magenta-green",
1228
"Magenta-Green color balance",
1230
GIMP_PARAM_READWRITE));
1231
gimp_procedure_add_argument (procedure,
1232
g_param_spec_double ("yellow-blue",
1234
"Yellow-Blue color balance",
1236
GIMP_PARAM_READWRITE));
1237
gimp_pdb_register_procedure (pdb, procedure);
1238
g_object_unref (procedure);
1243
procedure = gimp_procedure_new (colorize_invoker);
1244
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-colorize");
1245
gimp_procedure_set_static_strings (procedure,
1247
"Render the drawable as a grayscale image seen through a colored glass.",
1248
"Desaturates the drawable, then tints it with the specified color. This tool is only valid on RGB color images. It will not operate on grayscale or indexed drawables.",
1249
"Sven Neumann <sven@gimp.org>",
1253
gimp_procedure_add_argument (procedure,
1254
gimp_param_spec_drawable_id ("drawable",
1258
GIMP_PARAM_READWRITE));
1259
gimp_procedure_add_argument (procedure,
1260
g_param_spec_double ("hue",
1264
GIMP_PARAM_READWRITE));
1265
gimp_procedure_add_argument (procedure,
1266
g_param_spec_double ("saturation",
1268
"Saturation in percent",
1270
GIMP_PARAM_READWRITE));
1271
gimp_procedure_add_argument (procedure,
1272
g_param_spec_double ("lightness",
1274
"Lightness in percent",
1276
GIMP_PARAM_READWRITE));
1277
gimp_pdb_register_procedure (pdb, procedure);
1278
g_object_unref (procedure);
1283
procedure = gimp_procedure_new (histogram_invoker);
1284
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-histogram");
1285
gimp_procedure_set_static_strings (procedure,
1287
"Returns information on the intensity histogram for the specified drawable.",
1288
"This tool makes it possible to gather information about the intensity histogram of a drawable. A channel to examine is first specified. This can be either value, red, green, or blue, depending on whether the drawable is of type color or grayscale. The drawable may not be indexed. Second, a range of intensities are specified. The 'gimp-histogram' function returns statistics based on the pixels in the drawable that fall under this range of values. Mean, standard deviation, median, number of pixels, and percentile are all returned. Additionally, the total count of pixels in the image is returned. Counts of pixels are weighted by any associated alpha values and by the current selection mask. That is, pixels that lie outside an active selection mask will not be counted. Similarly, pixels with transparent alpha values will not be counted.",
1289
"Spencer Kimball & Peter Mattis",
1290
"Spencer Kimball & Peter Mattis",
1293
gimp_procedure_add_argument (procedure,
1294
gimp_param_spec_drawable_id ("drawable",
1298
GIMP_PARAM_READWRITE));
1299
gimp_procedure_add_argument (procedure,
1300
g_param_spec_enum ("channel",
1302
"The channel to modify",
1303
GIMP_TYPE_HISTOGRAM_CHANNEL,
1304
GIMP_HISTOGRAM_VALUE,
1305
GIMP_PARAM_READWRITE));
1306
gimp_procedure_add_argument (procedure,
1307
gimp_param_spec_int32 ("start-range",
1309
"Start of the intensity measurement range",
1311
GIMP_PARAM_READWRITE));
1312
gimp_procedure_add_argument (procedure,
1313
gimp_param_spec_int32 ("end-range",
1315
"End of the intensity measurement range",
1317
GIMP_PARAM_READWRITE));
1318
gimp_procedure_add_return_value (procedure,
1319
g_param_spec_double ("mean",
1321
"Mean intensity value",
1322
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
1323
GIMP_PARAM_READWRITE));
1324
gimp_procedure_add_return_value (procedure,
1325
g_param_spec_double ("std-dev",
1327
"Standard deviation of intensity values",
1328
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
1329
GIMP_PARAM_READWRITE));
1330
gimp_procedure_add_return_value (procedure,
1331
g_param_spec_double ("median",
1333
"Median intensity value",
1334
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
1335
GIMP_PARAM_READWRITE));
1336
gimp_procedure_add_return_value (procedure,
1337
g_param_spec_double ("pixels",
1339
"Alpha-weighted pixel count for entire image",
1340
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
1341
GIMP_PARAM_READWRITE));
1342
gimp_procedure_add_return_value (procedure,
1343
g_param_spec_double ("count",
1345
"Alpha-weighted pixel count for range",
1346
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
1347
GIMP_PARAM_READWRITE));
1348
gimp_procedure_add_return_value (procedure,
1349
g_param_spec_double ("percentile",
1351
"Percentile that range falls under",
1352
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
1353
GIMP_PARAM_READWRITE));
1354
gimp_pdb_register_procedure (pdb, procedure);
1355
g_object_unref (procedure);
1358
* gimp-hue-saturation
1360
procedure = gimp_procedure_new (hue_saturation_invoker);
1361
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-hue-saturation");
1362
gimp_procedure_set_static_strings (procedure,
1363
"gimp-hue-saturation",
1364
"Modify hue, lightness, and saturation in the specified drawable.",
1365
"This procedures allows the hue, lightness, and saturation in the specified drawable to be modified. The 'hue-range' parameter provides the capability to limit range of affected hues.",
1366
"Spencer Kimball & Peter Mattis",
1367
"Spencer Kimball & Peter Mattis",
1370
gimp_procedure_add_argument (procedure,
1371
gimp_param_spec_drawable_id ("drawable",
1375
GIMP_PARAM_READWRITE));
1376
gimp_procedure_add_argument (procedure,
1377
g_param_spec_enum ("hue-range",
1379
"Range of affected hues",
1380
GIMP_TYPE_HUE_RANGE,
1382
GIMP_PARAM_READWRITE));
1383
gimp_procedure_add_argument (procedure,
1384
g_param_spec_double ("hue-offset",
1386
"Hue offset in degrees",
1388
GIMP_PARAM_READWRITE));
1389
gimp_procedure_add_argument (procedure,
1390
g_param_spec_double ("lightness",
1392
"Lightness modification",
1394
GIMP_PARAM_READWRITE));
1395
gimp_procedure_add_argument (procedure,
1396
g_param_spec_double ("saturation",
1398
"Saturation modification",
1400
GIMP_PARAM_READWRITE));
1401
gimp_pdb_register_procedure (pdb, procedure);
1402
g_object_unref (procedure);
1407
procedure = gimp_procedure_new (threshold_invoker);
1408
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-threshold");
1409
gimp_procedure_set_static_strings (procedure,
1411
"Threshold the specified drawable.",
1412
"This procedures generates a threshold map of the specified drawable. All pixels between the values of 'low_threshold' and 'high_threshold' are replaced with white, and all other pixels with black.",
1413
"Spencer Kimball & Peter Mattis",
1414
"Spencer Kimball & Peter Mattis",
1417
gimp_procedure_add_argument (procedure,
1418
gimp_param_spec_drawable_id ("drawable",
1422
GIMP_PARAM_READWRITE));
1423
gimp_procedure_add_argument (procedure,
1424
gimp_param_spec_int32 ("low-threshold",
1426
"The low threshold value",
1428
GIMP_PARAM_READWRITE));
1429
gimp_procedure_add_argument (procedure,
1430
gimp_param_spec_int32 ("high-threshold",
1432
"The high threshold value",
1434
GIMP_PARAM_READWRITE));
1435
gimp_pdb_register_procedure (pdb, procedure);
1436
g_object_unref (procedure);