58
static GimpParamDef args[] =
61
static const GimpParamDef args[] =
60
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
61
{ GIMP_PDB_IMAGE, "image", "Input image" },
62
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
63
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
64
{ GIMP_PDB_IMAGE, "image", "Input image" },
65
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
65
gimp_install_procedure ("plug_in_c_astretch",
66
"Automatically stretch the contrast of the "
67
"specified drawable to cover all possible ranges.",
68
gimp_install_procedure (PLUG_IN_PROC,
69
N_("Stretch contrast to cover the maximum possible range"),
68
70
"This simple plug-in does an automatic contrast "
69
71
"stretch. For each channel in the image, it finds "
70
72
"the minimum and maximum values... it uses those "
109
111
if (gimp_drawable_is_rgb (drawable->drawable_id) ||
110
112
gimp_drawable_is_gray (drawable->drawable_id))
112
gimp_progress_init (_("Auto-Stretching Contrast..."));
114
gimp_progress_init (_("Auto-stretching contrast"));
113
115
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
114
116
c_astretch (drawable);
128
/* gimp_message ("c_astretch: cannot operate on indexed color images"); */
129
130
status = GIMP_PDB_EXECUTION_ERROR;
132
133
*nreturn_vals = 1;
133
*return_vals = values;
134
*return_vals = values;
135
values[0].type = GIMP_PDB_STATUS;
136
values[0].type = GIMP_PDB_STATUS;
136
137
values[0].data.d_status = status;
138
139
gimp_drawable_detach (drawable);