38
41
gint *nreturn_vals,
39
42
GimpParam **return_vals);
41
static void Color_Enhance (GimpDrawable *drawable);
42
static void indexed_Color_Enhance (gint32 image_ID);
45
GimpPlugInInfo PLUG_IN_INFO =
44
static void Color_Enhance (GimpDrawable *drawable);
45
static void indexed_Color_Enhance (gint32 image_ID);
48
const GimpPlugInInfo PLUG_IN_INFO =
47
50
NULL, /* init_proc */
48
51
NULL, /* quit_proc */
59
static GimpParamDef args[] =
62
static const GimpParamDef args[] =
61
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
62
{ GIMP_PDB_IMAGE, "image", "Input image" },
63
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
64
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
65
{ GIMP_PDB_IMAGE, "image", "Input image" },
66
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
66
gimp_install_procedure ("plug_in_color_enhance",
67
"Automatically stretch the saturation of the "
68
"specified drawable to cover all possible ranges.",
69
gimp_install_procedure (PLUG_IN_PROC,
70
N_("Stretch color saturation to cover maximum possible range"),
69
71
"This simple plug-in does an automatic saturation "
70
72
"stretch. For each channel in the image, it finds "
71
73
"the minimum and maximum values... it uses those "
112
113
if (gimp_drawable_is_rgb (drawable->drawable_id) ||
113
114
gimp_drawable_is_gray (drawable->drawable_id))
115
gimp_progress_init (_("Color Enhance..."));
116
gimp_progress_init (_("Color Enhance"));
116
117
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
117
118
Color_Enhance (drawable);
188
gimp_rgb_to_hsv4(map, &h, &z, &v);
189
gimp_rgb_to_hsv4 (map, &h, &z, &v);
191
192
v = (v - vlo) / (vhi - vlo);
193
gimp_hsv_to_rgb4(map, h, z, v);
194
gimp_hsv_to_rgb4 (map, h, z, v);