121
static GimpParamDef scatter_args[] =
118
static const GimpParamDef scatter_args[] =
123
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
120
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
124
121
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
125
122
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
126
123
{ GIMP_PDB_INT32, "independent", "Noise in channels independent" },
127
124
{ GIMP_PDB_INT32, "correlated", "Noise correlated (i.e. multiplicative not additive)" },
128
{ GIMP_PDB_FLOAT, "noise_1", "Noise in the first channel (red, gray)" },
129
{ GIMP_PDB_FLOAT, "noise_2", "Noise in the second channel (green, gray_alpha)" },
130
{ GIMP_PDB_FLOAT, "noise_3", "Noise in the third channel (blue)" },
131
{ GIMP_PDB_FLOAT, "noise_4", "Noise in the fourth channel (alpha)" }
125
{ GIMP_PDB_FLOAT, "noise-1", "Noise in the first channel (red, gray)" },
126
{ GIMP_PDB_FLOAT, "noise-2", "Noise in the second channel (green, gray_alpha)" },
127
{ GIMP_PDB_FLOAT, "noise-3", "Noise in the third channel (blue)" },
128
{ GIMP_PDB_FLOAT, "noise-4", "Noise in the fourth channel (alpha)" }
133
static GimpParamDef noisify_args[] =
130
static const GimpParamDef noisify_args[] =
135
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
132
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
136
133
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
137
134
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
138
135
{ GIMP_PDB_INT32, "independent", "Noise in channels independent" },
139
{ GIMP_PDB_FLOAT, "noise_1", "Noise in the first channel (red, gray)" },
140
{ GIMP_PDB_FLOAT, "noise_2", "Noise in the second channel (green, gray_alpha)" },
141
{ GIMP_PDB_FLOAT, "noise_3", "Noise in the third channel (blue)" },
142
{ GIMP_PDB_FLOAT, "noise_4", "Noise in the fourth channel (alpha)" }
136
{ GIMP_PDB_FLOAT, "noise-1", "Noise in the first channel (red, gray)" },
137
{ GIMP_PDB_FLOAT, "noise-2", "Noise in the second channel (green, gray_alpha)" },
138
{ GIMP_PDB_FLOAT, "noise-3", "Noise in the third channel (blue)" },
139
{ GIMP_PDB_FLOAT, "noise-4", "Noise in the fourth channel (alpha)" }
146
gimp_install_procedure ("plug_in_scatter_rgb",
147
"Adds random noise to image channels ",
143
gimp_install_procedure (RGB_NOISE_PROC,
144
N_("Distort colors by random amounts"),
148
145
"Add normally distributed (zero mean) random values "
149
146
"to image channels. Noise may be additive "
150
147
"(uncorrelated) or multiplicative (correlated - "
446
443
GtkWidget *table;
449
gimp_ui_init ("noisify", FALSE);
446
gimp_ui_init (PLUG_IN_BINARY, FALSE);
451
dialog = gimp_dialog_new (_("Scatter RGB"), "noisify",
448
dialog = gimp_dialog_new (_("RGB Noise"), PLUG_IN_BINARY,
453
gimp_standard_help_func, "plug-in-noisify",
450
gimp_standard_help_func, RGB_NOISE_PROC,
455
452
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
456
453
GTK_STOCK_OK, GTK_RESPONSE_OK,
457
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
462
gimp_window_set_transient (GTK_WINDOW (dialog));
460
464
main_vbox = gtk_vbox_new (FALSE, 12);
461
465
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
462
466
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);