2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1997-11-25 06:05:25 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
1997-11-25 06:05:25 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
1997-11-25 06:05:25 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
2007-12-31 01:54:51 +08:00
|
|
|
#include <gegl.h>
|
2000-12-29 23:22:01 +08:00
|
|
|
#include <gtk/gtk.h>
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2008-01-28 01:39:01 +08:00
|
|
|
#include "libgimpconfig/gimpconfig.h"
|
2001-01-25 06:36:18 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
2002-05-03 20:45:22 +08:00
|
|
|
#include "tools-types.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
|
2012-05-11 03:22:44 +08:00
|
|
|
#include "operations/gimpthresholdconfig.h"
|
2008-01-25 19:42:07 +08:00
|
|
|
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "core/gimpdrawable.h"
|
|
|
|
#include "core/gimpdrawable-histogram.h"
|
2008-11-12 18:56:06 +08:00
|
|
|
#include "core/gimperror.h"
|
2012-03-25 05:29:53 +08:00
|
|
|
#include "core/gimphistogram.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "core/gimpimage.h"
|
|
|
|
|
2003-08-22 09:42:57 +08:00
|
|
|
#include "widgets/gimphelp-ids.h"
|
2002-09-08 01:27:32 +08:00
|
|
|
#include "widgets/gimphistogrambox.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "widgets/gimphistogramview.h"
|
|
|
|
|
2001-09-26 07:23:09 +08:00
|
|
|
#include "display/gimpdisplay.h"
|
|
|
|
|
2003-10-24 16:12:21 +08:00
|
|
|
#include "gimphistogramoptions.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "gimpthresholdtool.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2003-03-26 00:38:19 +08:00
|
|
|
#include "gimp-intl.h"
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
|
2001-05-25 07:57:08 +08:00
|
|
|
/* local function prototypes */
|
1999-11-22 19:14:29 +08:00
|
|
|
|
2008-01-04 03:23:35 +08:00
|
|
|
static void gimp_threshold_tool_finalize (GObject *object);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2008-01-04 03:23:35 +08:00
|
|
|
static gboolean gimp_threshold_tool_initialize (GimpTool *tool,
|
|
|
|
GimpDisplay *display,
|
|
|
|
GError **error);
|
2002-08-26 19:35:56 +08:00
|
|
|
|
2008-01-31 02:31:43 +08:00
|
|
|
static GeglNode * gimp_threshold_tool_get_operation (GimpImageMapTool *im_tool,
|
2013-04-17 04:06:48 +08:00
|
|
|
GObject **config,
|
|
|
|
gchar **undo_desc);
|
2008-01-04 03:23:35 +08:00
|
|
|
static void gimp_threshold_tool_dialog (GimpImageMapTool *im_tool);
|
2008-01-31 02:31:43 +08:00
|
|
|
|
|
|
|
static void gimp_threshold_tool_config_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
GimpThresholdTool *t_tool);
|
2002-08-26 19:35:56 +08:00
|
|
|
|
2008-01-04 03:23:35 +08:00
|
|
|
static void gimp_threshold_tool_histogram_range (GimpHistogramView *view,
|
|
|
|
gint start,
|
|
|
|
gint end,
|
|
|
|
GimpThresholdTool *t_tool);
|
|
|
|
static void gimp_threshold_tool_auto_clicked (GtkWidget *button,
|
|
|
|
GimpThresholdTool *t_tool);
|
2000-12-31 12:07:42 +08:00
|
|
|
|
|
|
|
|
2005-12-13 17:13:50 +08:00
|
|
|
G_DEFINE_TYPE (GimpThresholdTool, gimp_threshold_tool,
|
2006-05-15 17:46:31 +08:00
|
|
|
GIMP_TYPE_IMAGE_MAP_TOOL)
|
2001-05-25 07:57:08 +08:00
|
|
|
|
2005-12-13 17:13:50 +08:00
|
|
|
#define parent_class gimp_threshold_tool_parent_class
|
2001-05-25 07:57:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
void
|
2002-03-29 11:50:29 +08:00
|
|
|
gimp_threshold_tool_register (GimpToolRegisterCallback callback,
|
2002-05-03 19:31:08 +08:00
|
|
|
gpointer data)
|
2001-05-25 07:57:08 +08:00
|
|
|
{
|
2002-03-29 11:50:29 +08:00
|
|
|
(* callback) (GIMP_TYPE_THRESHOLD_TOOL,
|
2003-10-24 16:12:21 +08:00
|
|
|
GIMP_TYPE_HISTOGRAM_OPTIONS,
|
|
|
|
gimp_histogram_options_gui,
|
2003-06-28 19:20:37 +08:00
|
|
|
0,
|
2002-03-21 20:17:17 +08:00
|
|
|
"gimp-threshold-tool",
|
2001-11-21 07:00:47 +08:00
|
|
|
_("Threshold"),
|
2006-09-19 02:00:22 +08:00
|
|
|
_("Threshold Tool: Reduce image to two colors using a threshold"),
|
2004-04-29 21:19:28 +08:00
|
|
|
N_("_Threshold..."), NULL,
|
2003-08-22 09:42:57 +08:00
|
|
|
NULL, GIMP_HELP_TOOL_THRESHOLD,
|
2002-03-29 11:50:29 +08:00
|
|
|
GIMP_STOCK_TOOL_THRESHOLD,
|
2002-05-03 19:31:08 +08:00
|
|
|
data);
|
2001-05-25 07:57:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_threshold_tool_class_init (GimpThresholdToolClass *klass)
|
|
|
|
{
|
2005-12-13 17:13:50 +08:00
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
|
|
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
|
|
|
|
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
|
2001-05-25 07:57:08 +08:00
|
|
|
|
2008-05-22 19:00:50 +08:00
|
|
|
object_class->finalize = gimp_threshold_tool_finalize;
|
2002-08-26 19:35:56 +08:00
|
|
|
|
2008-05-22 19:00:50 +08:00
|
|
|
tool_class->initialize = gimp_threshold_tool_initialize;
|
2002-08-26 19:35:56 +08:00
|
|
|
|
2011-03-21 01:27:11 +08:00
|
|
|
im_tool_class->dialog_desc = _("Apply Threshold");
|
2008-05-22 19:00:50 +08:00
|
|
|
im_tool_class->settings_name = "threshold";
|
|
|
|
im_tool_class->import_dialog_title = _("Import Threshold Settings");
|
|
|
|
im_tool_class->export_dialog_title = _("Export Threshold Settings");
|
2004-02-25 21:55:45 +08:00
|
|
|
|
2008-05-22 19:00:50 +08:00
|
|
|
im_tool_class->get_operation = gimp_threshold_tool_get_operation;
|
|
|
|
im_tool_class->dialog = gimp_threshold_tool_dialog;
|
2001-05-25 07:57:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-08-26 19:35:56 +08:00
|
|
|
gimp_threshold_tool_init (GimpThresholdTool *t_tool)
|
2001-05-25 07:57:08 +08:00
|
|
|
{
|
2013-06-12 07:02:25 +08:00
|
|
|
t_tool->histogram = gimp_histogram_new (TRUE);
|
2001-05-25 07:57:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-08-26 19:35:56 +08:00
|
|
|
gimp_threshold_tool_finalize (GObject *object)
|
2001-05-25 07:57:08 +08:00
|
|
|
{
|
2003-10-24 16:12:21 +08:00
|
|
|
GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (object);
|
2002-08-26 19:35:56 +08:00
|
|
|
|
2008-02-05 05:41:57 +08:00
|
|
|
if (t_tool->histogram)
|
2001-05-25 07:57:08 +08:00
|
|
|
{
|
2013-06-12 03:23:32 +08:00
|
|
|
g_object_unref (t_tool->histogram);
|
2008-02-05 05:41:57 +08:00
|
|
|
t_tool->histogram = NULL;
|
2001-05-25 07:57:08 +08:00
|
|
|
}
|
|
|
|
|
2002-08-26 19:35:56 +08:00
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
2001-05-25 07:57:08 +08:00
|
|
|
}
|
|
|
|
|
2004-01-22 00:07:48 +08:00
|
|
|
static gboolean
|
2006-09-27 04:55:40 +08:00
|
|
|
gimp_threshold_tool_initialize (GimpTool *tool,
|
|
|
|
GimpDisplay *display,
|
|
|
|
GError **error)
|
2001-05-25 07:57:08 +08:00
|
|
|
{
|
2007-07-19 22:59:51 +08:00
|
|
|
GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (tool);
|
2009-10-07 01:20:44 +08:00
|
|
|
GimpImage *image = gimp_display_get_image (display);
|
|
|
|
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
2003-02-04 07:54:19 +08:00
|
|
|
|
2009-08-20 23:05:23 +08:00
|
|
|
if (! GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error))
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2001-05-25 07:57:08 +08:00
|
|
|
|
2008-02-05 05:41:57 +08:00
|
|
|
gimp_drawable_calculate_histogram (drawable, t_tool->histogram);
|
2003-11-01 10:39:34 +08:00
|
|
|
gimp_histogram_view_set_histogram (t_tool->histogram_box->view,
|
2008-02-05 05:41:57 +08:00
|
|
|
t_tool->histogram);
|
1999-06-23 23:24:46 +08:00
|
|
|
|
2004-01-22 00:07:48 +08:00
|
|
|
return TRUE;
|
added gimphistogram*, histogramwidget*, removed histogram.[ch]
* app/Makefile.am: added gimphistogram*, histogramwidget*,
removed histogram.[ch]
* app/histogram.[ch]: removed. replaced with histogramwidget.[ch].
* app/{gimphistogramP.h, gimphistogram.h, gimphistogram.c}: new
functions that calculate histograms in parallel and perform
calculations on them.
* app/histogramwidget.[ch]: Same as old histogram.[ch], only it is
now a real widget, and it uses GimpHistograms instead of arrays of
values.
* app/curves.c: #include gimphistogram.h instead of histogram.h.
* app/equalize.c: use GimpHistogram and GimpLut.
* app/gimpbrush.c, app/gimpimage.c, app/gimpset.c: use
GTK_RUN_FIRST in calls to gimp_signal_new.
* app/histogram_tool.c, app/levels.c, app/threshold.c: modified to
use the new HistogramWidget.
* app/paint_funcs.c: removed some unused variables.
* app/preferences_dialog.c: only display the num-processor field
if we are configured --with-mp
* plug-ins/gee/gee.c: removed a couple of c++ style comments.
1999-03-01 13:11:19 +08:00
|
|
|
}
|
|
|
|
|
2008-01-04 03:23:35 +08:00
|
|
|
static GeglNode *
|
2008-01-31 02:31:43 +08:00
|
|
|
gimp_threshold_tool_get_operation (GimpImageMapTool *image_map_tool,
|
2013-04-17 04:06:48 +08:00
|
|
|
GObject **config,
|
|
|
|
gchar **undo_desc)
|
2008-01-04 03:23:35 +08:00
|
|
|
{
|
2008-01-25 19:42:07 +08:00
|
|
|
GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (image_map_tool);
|
|
|
|
|
|
|
|
t_tool->config = g_object_new (GIMP_TYPE_THRESHOLD_CONFIG, NULL);
|
|
|
|
|
2008-01-31 02:31:43 +08:00
|
|
|
g_signal_connect_object (t_tool->config, "notify",
|
|
|
|
G_CALLBACK (gimp_threshold_tool_config_notify),
|
|
|
|
G_OBJECT (t_tool), 0);
|
|
|
|
|
2013-04-17 04:06:48 +08:00
|
|
|
*config = G_OBJECT (t_tool->config);
|
2008-01-25 19:42:07 +08:00
|
|
|
|
2013-04-17 04:06:48 +08:00
|
|
|
return gegl_node_new_child (NULL,
|
|
|
|
"operation", "gimp:threshold",
|
|
|
|
"config", t_tool->config,
|
|
|
|
NULL);
|
2008-01-04 03:23:35 +08:00
|
|
|
}
|
|
|
|
|
2002-08-26 19:35:56 +08:00
|
|
|
|
1999-06-23 23:24:46 +08:00
|
|
|
/**********************/
|
|
|
|
/* Threshold dialog */
|
|
|
|
/**********************/
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2002-08-26 19:35:56 +08:00
|
|
|
static void
|
|
|
|
gimp_threshold_tool_dialog (GimpImageMapTool *image_map_tool)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2008-02-05 05:41:57 +08:00
|
|
|
GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (image_map_tool);
|
|
|
|
GimpToolOptions *tool_options = GIMP_TOOL_GET_OPTIONS (image_map_tool);
|
|
|
|
GimpThresholdConfig *config = t_tool->config;
|
2008-06-03 18:51:04 +08:00
|
|
|
GtkWidget *main_vbox;
|
2008-02-05 05:41:57 +08:00
|
|
|
GtkWidget *hbox;
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *box;
|
|
|
|
GtkWidget *button;
|
2013-06-12 22:35:15 +08:00
|
|
|
gint n_bins;
|
2002-08-26 19:35:56 +08:00
|
|
|
|
2008-06-03 18:51:04 +08:00
|
|
|
main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
|
2004-03-05 09:31:33 +08:00
|
|
|
|
2011-09-30 17:29:11 +08:00
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
2008-06-03 18:51:04 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
|
2004-03-05 09:31:33 +08:00
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
2014-05-08 03:30:06 +08:00
|
|
|
menu = gimp_prop_enum_icon_box_new (G_OBJECT (tool_options),
|
|
|
|
"histogram-scale", "gimp-histogram",
|
|
|
|
0, 0);
|
2004-03-05 09:31:33 +08:00
|
|
|
gtk_box_pack_end (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (menu);
|
|
|
|
|
2004-06-21 06:04:10 +08:00
|
|
|
box = gimp_histogram_box_new ();
|
2008-06-03 18:51:04 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (main_vbox), box, TRUE, TRUE, 0);
|
2002-10-15 09:15:43 +08:00
|
|
|
gtk_widget_show (box);
|
2002-08-29 03:47:07 +08:00
|
|
|
|
2002-10-15 09:15:43 +08:00
|
|
|
t_tool->histogram_box = GIMP_HISTOGRAM_BOX (box);
|
1999-11-22 19:14:29 +08:00
|
|
|
|
2013-06-12 22:35:15 +08:00
|
|
|
n_bins = gimp_histogram_n_bins (t_tool->histogram);
|
|
|
|
|
2008-02-05 05:41:57 +08:00
|
|
|
gimp_histogram_view_set_range (t_tool->histogram_box->view,
|
2013-06-12 22:35:15 +08:00
|
|
|
config->low * (n_bins - 0.0001),
|
|
|
|
config->high * (n_bins - 0.0001));
|
2008-02-05 05:41:57 +08:00
|
|
|
|
2005-05-28 00:51:39 +08:00
|
|
|
g_signal_connect (t_tool->histogram_box->view, "range-changed",
|
2002-09-08 01:27:32 +08:00
|
|
|
G_CALLBACK (gimp_threshold_tool_histogram_range),
|
2002-08-26 19:35:56 +08:00
|
|
|
t_tool);
|
2003-10-24 16:12:21 +08:00
|
|
|
|
|
|
|
gimp_histogram_options_connect_view (GIMP_HISTOGRAM_OPTIONS (tool_options),
|
2003-11-01 10:39:34 +08:00
|
|
|
t_tool->histogram_box->view);
|
2006-04-26 02:02:30 +08:00
|
|
|
|
2011-09-30 17:29:11 +08:00
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
2008-06-03 18:51:04 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
|
2006-04-26 02:02:30 +08:00
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
button = gtk_button_new_with_mnemonic (_("_Auto"));
|
|
|
|
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
|
|
gimp_help_set_help_data (button, _("Automatically adjust to optimal "
|
|
|
|
"binarization threshold"), NULL);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
G_CALLBACK (gimp_threshold_tool_auto_clicked),
|
|
|
|
t_tool);
|
1999-11-22 19:14:29 +08:00
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
static void
|
2008-01-31 02:31:43 +08:00
|
|
|
gimp_threshold_tool_config_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
GimpThresholdTool *t_tool)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2008-01-31 02:31:43 +08:00
|
|
|
GimpThresholdConfig *config = GIMP_THRESHOLD_CONFIG (object);
|
2013-06-12 22:35:15 +08:00
|
|
|
gint n_bins;
|
1999-11-22 19:14:29 +08:00
|
|
|
|
2008-02-05 05:41:57 +08:00
|
|
|
if (! t_tool->histogram_box)
|
|
|
|
return;
|
|
|
|
|
2013-06-12 22:35:15 +08:00
|
|
|
n_bins = gimp_histogram_n_bins (t_tool->histogram);
|
|
|
|
|
2008-02-05 05:41:57 +08:00
|
|
|
gimp_histogram_view_set_range (t_tool->histogram_box->view,
|
2013-06-12 22:35:15 +08:00
|
|
|
config->low * (n_bins - 0.0001),
|
|
|
|
config->high * (n_bins - 0.0001));
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-09-08 01:27:32 +08:00
|
|
|
gimp_threshold_tool_histogram_range (GimpHistogramView *widget,
|
|
|
|
gint start,
|
|
|
|
gint end,
|
|
|
|
GimpThresholdTool *t_tool)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2013-06-12 22:35:15 +08:00
|
|
|
gint n_bins = gimp_histogram_n_bins (t_tool->histogram);
|
|
|
|
gdouble low = (gdouble) start / (n_bins - 1);
|
|
|
|
gdouble high = (gdouble) end / (n_bins - 1);
|
2008-01-25 19:42:07 +08:00
|
|
|
|
|
|
|
if (low != t_tool->config->low ||
|
|
|
|
high != t_tool->config->high)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2008-01-25 19:42:07 +08:00
|
|
|
g_object_set (t_tool->config,
|
|
|
|
"low", low,
|
|
|
|
"high", high,
|
|
|
|
NULL);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
}
|
2006-04-26 02:02:30 +08:00
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_threshold_tool_auto_clicked (GtkWidget *button,
|
|
|
|
GimpThresholdTool *t_tool)
|
|
|
|
{
|
2008-02-04 07:50:55 +08:00
|
|
|
GimpDrawable *drawable = GIMP_IMAGE_MAP_TOOL (t_tool)->drawable;
|
2013-06-12 22:35:15 +08:00
|
|
|
gint n_bins = gimp_histogram_n_bins (t_tool->histogram);
|
2008-02-04 07:50:55 +08:00
|
|
|
gdouble low;
|
|
|
|
|
2008-02-05 05:41:57 +08:00
|
|
|
low = gimp_histogram_get_threshold (t_tool->histogram,
|
2008-02-04 07:50:55 +08:00
|
|
|
gimp_drawable_is_rgb (drawable) ?
|
|
|
|
GIMP_HISTOGRAM_RGB :
|
|
|
|
GIMP_HISTOGRAM_VALUE,
|
2013-06-12 22:35:15 +08:00
|
|
|
0, n_bins - 1);
|
2006-04-26 02:02:30 +08:00
|
|
|
|
|
|
|
gimp_histogram_view_set_range (t_tool->histogram_box->view,
|
2013-06-12 22:35:15 +08:00
|
|
|
low, n_bins - 1);
|
2006-04-26 02:02:30 +08:00
|
|
|
}
|