2006-04-21 Sven Neumann <sven@gimp.org>
Applied a slightly modified version of a patch from Lode Leroy
(bug #336183):
* app/base/gimphistogram.[ch]: added new function
gimp_histogram_get_threshold() that returns an optimal
binarization threshold.
* app/tools/gimpthresholdtool.c: use the new function to
initialize the Threshold tool.
2005-02-14 Sven Neumann <sven@gimp.org>
* app/base/gimphistogram.c: allocate histogram slots in one large
block instead of multiple smaller chunks. Hide pointer arithmetic
in macros.
2005-02-14 Sven Neumann <sven@gimp.org>
* app/base/gimphistogram.[ch]: allocate temporary histogram slots
on demand and provide an array with enough slots for the maximum
number of threads. gimp_histogram_new() doesn't need a
GimpBaseConfig parameter any longer.
* app/core/gimpdrawable-equalize.c
* app/core/gimpdrawable-levels.c
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c
* app/tools/gimpthresholdtool.c
* app/widgets/gimphistogrameditor.c
* tools/pdbgen/pdb/color.pdb: changed accordingly.
* app/pdb/color_cmds.c: regenerated.
2004-07-06 Sven Neumann <sven@gimp.org>
Added an RGB histogram based on a patch by Tor Lillqvist. Fixes
bug #145401.
* app/base/base-enums.[ch]: added GIMP_HISTOGRAM_RGB, don't export
it to the PDB.
* app/base/gimphistogram.c: implemented histogram functions for
the RGB mode.
* app/base/levels.c
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c
* app/widgets/gimpcolorbar.c
* app/widgets/gimphistogrameditor.c: handle the new enum value.
* app/widgets/gimphistogramview.c: for GIMP_HISTOGRAM_RGB mode,
draw a histogram that shows the RGB channels simultaneously
2004-01-13 Michael Natterer <mitch@gimp.org>
* app/base/gimphistogram.c: added GimpHistogramChannel index
fiddling hacks for GRAYA images to all gimp_histogram_get_*()
functions. The public API now does what their enum values pretend
to do.
(gimp_histogram_calculate): restructured to reduce indentation depth.
* app/widgets/gimphistogrameditor.c
* app/widgets/gimphistogramview.c
* tools/pdbgen/pdb/color.pdb: removed hacks here and always use
the unchanged enum values.
* app/pdb/color_cmds.c: regenerated.
2004-01-13 Michael Natterer <mitch@gimp.org>
* app/base/gimphistogram.[ch]: renamed gimp_histogram_nchannels()
to gimp_histogram_n_channels().
* app/core/gimpdrawable-histogram.c: removed silly double negation
logic. Cleanup.
* app/widgets/gimphistogrameditor.c
* app/widgets/gimphistogramview.c: adjust the GimpHistogramChannel
for GRAYA images to make sure we pick alpha from the right slot.
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c: removed the same hack here and call
gimp_histogram_view_set_channel() with the correct enum value.
* tools/pdbgen/pdb/color.pdb (levels, curves, histogram): fiddle
with enum values here too so GRAY* drawables produce the correct
results.
Fixed precondition checks and set "success" in a uniform way all
over the place.
Use gimp_drawable_calculate_histogram() instead of duplicating its
code here.
(started with a patch from Pedro Gimeno. Fixes bug #109078)
* app/pdb/color_cmds.c: regenerated.
2004-01-12 Michael Natterer <mitch@gimp.org>
* app/base/gimphistogram.c (gimp_histogram_calculate_sub_region):
advance the source pointer by 4, not 3 bytes for regions with
4 bytes (ouch). Cosmetics.
2003-11-01 Sven Neumann <sven@gimp.org>
* app/base/gimphistogram.c (gimp_histogram_get_mean): forgot to
also add a range check here.
* app/widgets/gimphistogrameditor.c: update the channel menu when
the image mode changes or an alpha channel is added/removed.
2003-11-01 Sven Neumann <sven@gimp.org>
Replaced the histogram tool by a histogram dialog:
* themes/Default/images/Makefile.am
* themes/Default/images/tools/stock-tool-histogram-[16|22].png:
removed here ...
* themes/Default/images/stock-histogram-[16|22].png: ,,, and added
under these new names.
* libgimpwidgets/gimpstock.[ch]: register the icons as
GIMP_STOCK_HISTOGRAM and removed the histogram tool stock icons.
* app/base/gimphistogram.c: don't crash when uncalculated values
are requested from a GimpHistogram. Allow to reset the histogram
by calling gimp_histogram_calculate() with a NULL region.
* app/widgets/gimphistogrambox.[ch]: renamed the GimpHistogramView
struct member to "view".
* app/tools/gimpthresholdtool.c: changed accordingly.
* app/widgets/gimphistogramview.[ch] (gimp_histogram_view_events):
return TRUE when events were handled.
* app/tools/Makefile.am
* app/tools/gimp-tools.c
* app/tools/gimphistogramtool.[ch]: removed the histogram tool.
* app/widgets/Makefile.am
* app/widgets/gimphelp-ids.h
* app/widgets/widgets-types.h
* app/widgets/gimphistogrameditor.[ch]: added GimpHistogramEditor.
Has some rough edges still...
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs.c
* app/gui/image-menu.c: register the new dialog instead of the
histogram tool.
2003-01-15 Sven Neumann <sven@gimp.org>
Fixed bug #103561:
* app/base/gimphistogram.[ch]: cleaned up multi-processor code,
added a GimpBaseConfig parameter to gimp_histogram_new().
* app/core/gimpdrawable-equalize.c
* app/pdb/color_cmds.c
* app/tools/gimphistogramtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpthresholdtool.c
* tools/pdbgen/pdb/color.pdb: changed accordingly.
* app/base/pixel-processor.c: some cleanup to the multi-processor
code; use the global base_config variable :(
2002-09-07 Michael Natterer <mitch@gimp.org>
Histogram cleanup:
* app/base/gimphistogram.c: Added g_return_if_fail() to all public
functions, reordered stuff, cleanup (no logic changed).
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimphistogrambox.[ch]: new widget containing a
GimpHistogramView and two range spinbuttons (as known from the
threshold tool). Users only need to connect to the histogram
view's "range_changed" signal. The spinbuttons are handled
internally.
* app/widgets/gimphistogramview.[ch]: define it's default size in
the header. Make sure "start" is always smaller than "end". Emit
"range_changed" in gimp_histogram_view_set_range().
* app/tools/gimplevelstool.c: changed accordingly.
* app/tools/gimpthresholdtool.[ch]: removed the code which
did the same and use the new widget.
* app/tools/gimphistogramtool.[ch]: ditto. Removed the "intensity"
info label. Cleanup.
2001-12-07 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.[ch]: removed from CVS, they are generated.
* app/base/Makefile.am
* app/base/base-enums.h: new file defining enums that are to be
registered. Used to build app/base/base-enums.c.
* app/base/base-types.h: include base-enums.h.
* tools/pdbgen/Makefile.am
* tools/pdbgen/enumcode.pl
* tools/pdbgen/enums.pl: parse the new base-enums.h file and modified
the perl voodoo so it doesn't prefix enums with GIMP_ that are already
properly namespaced.
* app/core/core-types.h: don't need to chop GIMP from enum.
* app/pdb/color_cmds.c
* app/pdb/tools_cmds.c
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c: regenerated.
* app/config/gimpconfig-deserialize.[ch]
* app/config/gimpconfig-serialize.[ch]
* app/config/gimpconfig.[ch]: made GimpConfig an interface including
a reasonable default implementation that works on object properties.
* app/config/Makefile.am
* app/config/gimpbaseconfig.[ch]: new GimpBaseConfig using the
GimpConfig interface. Yet only used for testing from app/main.c.
* app/main.c: test the new GimpBaseConfig object.
* app/gimprc.c
* app/base/base-config.h
* app/base/*.c
* app/core/gimpdatafiles.c
* app/core/gimpdrawable-transform.c
* app/core/gimppreviewcache.c
* app/gui/preferences-dialog.c
* app/paint-funcs/paint-funcs.c
* app/xcf/xcf-seek.c: need to include glib-object.h since base-config
contains registered enums now. Follow name change of InterpolationType
to GimpInterpolationType.
2001-05-15 Michael Natterer <mitch@gimp.org>
* configure.in: new directory app/base/
* app/Makefile.am
* app/boundary.[ch]
* app/brush_scale.[ch]
* app/gimpchecks.h
* app/gimplut.[ch]
* app/pixel_processor.[ch]
* app/pixel_region.[ch]
* app/pixel_surround.[ch]
* app/temp_buf.[ch]
* app/tile.[ch]
* app/tile_cache.[ch]
* app/tile_manager.[ch]
* app/tile_manager_pvt.h
* app/tile_pvt.h
* app/tile_swap.[ch]: moved to base/
* app/base/Makefile.am
* app/base/base-types.h
* app/base/*: new directory for the sub-object pixel maniplation
and storage stuff. Does not include Gtk+ or anything outside
base/. Did some cleanup in all files.
* app/appenums.h
* app/apptypes.h
* app/core/gimpimage.h: removed types which are now in
base/base-types.h.
* app/base/base-config.[ch]
* app/gimprc.[ch]: put the config variables for base/ to their own
file so base/ doesn not have to include gimprc.h (does not yet
work, i.e. the variables are un-configurable right now)
* app/main.c: set a log handler for "Gimp-Base".
* app/paint-funcs/Makefile.am
* app/paint-funcs/paint-funcs.[ch]: removed the color hash which
maps RGB to color indices because it's a totally standalone system
which has nothing to do with the paint-funcs and introduced a
GimpImage dependency.
paint-funcs/ should be considered on the same sub-object
(glib-only) level as base/, only in a different directory.
* app/core/Makefile.am
* app/core/gimpimage-colorhash.[ch]: put the color hash here.
* app/gimage.c: don't invalidate the color hash here...
* app/core/gimpimage.c: ... but in the colormap_changed() default
inplementation. Initialize the hash in class_init().
* tools/pdbgen/Makefile.am: scan app/base/base-types.h for enums.
* tools/pdbgen/enums.pl: regenerated.
* app/[lots]
* app/core/[of]
* app/gui/[files]
* app/pdb/[all]
* app/tools/[over]
* app/widgets/[the]
* tools/pdbgen/pdb/[place]: changed #includes accordingly. And use
base_config->value instead of the stuff from gimprc.h.
2001-01-24 Michael Natterer <mitch@gimp.org>
* Makefile.am
* configure.in
* gimptool.in: added the new library below.
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpchainbutton.[ch]
* libgimpwidgets/gimpcolorarea.[ch]
* libgimpwidgets/gimpcolorbutton.[ch]
* libgimpwidgets/gimpdialog.[ch]
* libgimpwidgets/gimpfileselection.[ch]
* libgimpwidgets/gimphelpui.[ch]
* libgimpwidgets/gimppatheditor.[ch]
* libgimpwidgets/gimppixmap.[ch]
* libgimpwidgets/gimpquerybox.[ch]
* libgimpwidgets/gimpsizeentry.[ch]
* libgimpwidgets/gimpunitmenu.[ch]
* libgimpwidgets/gimpwidgets.[ch]
* libgimpwidgets/gimpwidgets.def
* libgimpwidgets/gimpwidgetstypes.h: new shared library.
Currently there are some ugly dependencies into libgimp. These
will be removed and go to a "libgimpglue" library which will be
a library for functions which share a common interface between
plug-ins and the app but have different implementations.
Include "libgimp/gimpunit.h" from "libgimpwidgets/gimpwidgetstypes.h"
to simulate this upcoming separation.
* libgimp/Makefile.am
* libgimp/gimpchainbutton.[ch]
* libgimp/gimpcolorarea.[ch]
* libgimp/gimpcolorbutton.[ch]
* libgimp/gimpdialog.[ch]
* libgimp/gimpfileselection.[ch]
* libgimp/gimphelpui.[ch]
* libgimp/gimppatheditor.[ch]
* libgimp/gimppixmap.[ch]
* libgimp/gimpquerybox.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: removed from here.
* libgimp/gimpui.h
* libgimp/gimpuitypes.h
* libgimp/makefile.mingw.in
* libgimp/makefile.msc: changed accordingly.
* app/[all ui files]
* app/pdb/palette_cmds.c
* app/pdb/tools_cmds.c
* tools/pdbgen/pdb/palette.pdb
* tools/pdbgen/pdb/tools.pdb: #include "libgimpwidgets/gimpwidgets.h"
and removed useless includes.
* app/apptypes.h: #include "libgimpwidgets/gimpwidgetstypes.h"
* app/Makefile.am
* plug-ins/[all makefiles which link against libgimpui]:
link against libgimpwidgets.la
* po-libgimp/POTFILES.in: changed file locations.
2000-12-29 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/channel_pvt.h
* app/drawable_pvt.h
* app/gdisplayF.h
* app/gimpdrawableP.h
* app/gimpimageP.h
* app/layer_pvt.h
* app/toolsF.h: removed these files.
* app/apptypes.h
* tools/pdbgen/enums.pl: added tons of opaque typedefs and enums.
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/display.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/tools.pdb
* app/*: chainsaw #include cleanup:
- Never (never!!) include stuff in header files except where we
need access to structures' contents (like derived objects).
- Added prototypes and proper formating in many files.
- The #include order in *all* *.c files is as follows:
#include "config.h"
#include <system stuff>
#include <gtk/gtk.h>
#include "apptypes.h"
#include "gimp stuff"
#include "libgimp stuff"
#include "libgimp/gimpintl.h"
By following this scheme we can easily see a file's dependencies
from it's #include's and can grep for the inclusion to find out
where a file is used.
* tools/pdbgen/app.pl: changed to follow the include scheme above.
* libgimp/Makefile.am
* libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h
and from app/apptypes.h.
* libgimp/gimpcolorbutton.[ch]
* libgimp/gimpdialog.[ch]
* libgimp/gimphelpui.[ch]
* libgimp/gimpparasite.[ch]
* libgimp/gimppatheditor.[ch]
* libgimp/gimpprotocol.c
* libgimp/gimpquerybox.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimptypes.h
* libgimp/gimpui.h
* libgimp/gimpunit.h
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: changed accordingly.
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/gdyntext/message_window.c
* plug-ins/imagemap/imap_default_dialog.c
* plug-ins/imagemap/imap_file.c: these files used to include
"libgimp/gimpui.h" without including "libgimp/gimp.h". This is
no longer possible because the libgimpui headers don't inlcude
"libgimp/gimpunit.h" any more.
2000-12-19 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/gimphistogramP.h: removed.
* app/gimphistogram.[ch]
* app/histogramwidget.[ch]: Histogram cleanup: replaced the
channel #define's by a properly named enum and use this enum
type as parameter in functions instead of "int".
* app/curves.c
* app/histogram_tool.c
* app/levels.c: changed accordingly.
* app/gdisplay.c
* app/gimage_cmds.c
* tools/pdbgen/pdb/gimage.pdb: fixed typos
* app/gimphistogram.c: indentation
* app/histogramwidget.c: grab the pointer in the histogramwidget,
so a button_release outside the widget is noticed correctly
* app/levels.c: instead of undoing the user action, simply don't
allow the user to set the range in the histogram_widget
--Sven
* 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.