Commit Graph

14 Commits

Author SHA1 Message Date
Michael Natterer 5d07620d58 new utility function which maps a single value.
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationlevels.[ch]
	(gimp_operation_levels_map_input): new utility function which maps
	a single value.

	* app/tools/gimplevelstool.[ch] (levels_update_adjustments): use the
	new function to create the input arrays for gimp_color_bar_set_buffer().

	Removed the Levels struct from the GimpLevelsTool struct and only
	use it in map() when needed.

	* app/base/levels.[ch]: remove obsolete API and struct members.


svn path=/trunk/; revision=24682
2008-01-23 08:48:29 +00:00
Michael Natterer 455dad245e port to GEGL and use the new code path when use-gegl is TRUE.
2008-01-21  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-levels.c: port to GEGL and use the new
	code path when use-gegl is TRUE.

	* app/base/levels.[ch]: remove stretch and pick APIs which are not
	used any longer.


svn path=/trunk/; revision=24659
2008-01-21 12:55:18 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Sven Neumann 4f870bc132 deprecated RGB intensity functions and definitions. These coefficients do
2005-08-03  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb.[ch]: deprecated RGB intensity functions
	and definitions. These coefficients do not accurately compute
	luminance for contemporary monitors. Instead the coefficients from
	the sRGB spec should be used which have now been added.

	* libgimpcolor/gimpcolor.def: updated.

	* libgimp/gimpdrawable.c
	* libgimp/gimppixelfetcher.c
	* app/base/colorize.c
	* app/base/levels.c
	* app/base/temp-buf.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-convert.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage.c
	* app/gui/splash.c
	* app/widgets/gimpgradienteditor.c
	* modules/colorsel_triangle.c
	* plug-ins/common/aa.c
	* plug-ins/common/bumpmap.c
	* plug-ins/common/colorify.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/displace.c
	* plug-ins/common/engrave.c
	* plug-ins/common/gradmap.c
	* plug-ins/common/grid.c
	* plug-ins/common/mng.c
	* plug-ins/common/newsprint.c
	* plug-ins/common/png.c
	* plug-ins/common/whirlpinch.c
	* plug-ins/gflare/gflare.c
	* plug-ins/gfli/gfli.c
	* plug-ins/maze/handy.c
	* plug-ins/pagecurl/pagecurl.c: use gimp_rgb_luminance() and
	friends instead of the deprecated intensity functions.
2005-08-03 00:36:41 +00:00
Øyvind Kolås c5c0a219d9 renamed *levels-auto to *levels-stretch 2004-11-01 16:05:19 +00:00
Sven Neumann ef885f7691 Added an RGB histogram based on a patch by Tor Lillqvist. Fixes bug
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-07-06 16:33:30 +00:00
Michael Natterer a2850f6df2 Fixed bug #141930 while keeping bug #132322 fixed:
2004-06-28  Michael Natterer  <mitch@gimp.org>

	Fixed bug #141930 while keeping bug #132322 fixed:

	* app/base/curves.c (curves_lut_func)
	* app/base/levels.c (levels_lut_func): changed meaning of channel
	slots for GRAYA images: just as for GRAY images, expect the value
	channel in slot 0 and the alpha channel in slot 1, so it matches
	the meaning of slots of GimpHistogram (before this change, only
	GRAY images had their value in slot 0 and GRAYA images had it in
	slot 1, whereas the histogram had the value channel in slot 0,
	which was breaking auto levels for GRAYA images).

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c
	* tools/pdbgen/pdb/color.pdb: adjusted channel fiddling for GRAY
	and GRAYA images accordingly.

	* app/tools/gimpcurvestool.c (curves_update)
	* app/tools/gimplevelstool.c (levels_update): call
	gimp_color_bar_set_buffers() with the right buffers.

	* app/pdb/color_cmds.c: regenerated.
2004-06-28 14:24:56 +00:00
Dave Neary ffdd5ee026 Modify behaviour of levels tool to conserve lightness when using the
2003-12-26  Dave Neary  <bolsh@gimp.org>

        * app/base/levels.c: Modify behaviour of levels tool to
        conserve lightness when using the grey-point color-picker.
2003-12-26 21:28:30 +00:00
Sven Neumann d4b49c0c38 added a missing GimpHistogramChannel parameter. Fixes wrong values in the
2003-10-30  Sven Neumann  <sven@gimp.org>

	* app/base/gimphistogram.[ch] (gimp_histogram_get_count): added a
	missing GimpHistogramChannel parameter. Fixes wrong values in the
	histogram tool.

	* app/base/levels.c
	* app/base/lut-funcs.c
	* app/pdb/color_cmds.c
	* tools/pdbgen/pdb/color.pdb: changed accordingly.

	* app/tools/gimphistogramtool.c: update the histogram statistics
	on channel changes.
2003-10-30 17:48:16 +00:00
Sven Neumann 70c61f66c2 check for gdk-pixbuf-csource and allow to override it by setting the
2003-03-16  Sven Neumann  <sven@gimp.org>

	* configure.in: check for gdk-pixbuf-csource and allow to override
	it by setting the GDK_PIXBUF_CSOURCE environment variable.

	* themes/Default/images/Makefile.am: use the gdk-pixbuf-csource
	executable that was found at configure time.

	* app/base/levels.c: cosmetic change.

	* app/tools/gimplevelstool.c: allow to pick white, gray and black
	point for all channels. Allows for easy white-point balancing.

	* plug-ins/script-fu/scripts/3dTruchet.scm: restore the foreground
	color when the script is done (see bug #108473).
2003-03-16 17:00:40 +00:00
Sven Neumann 85323a3c2a implemented this function which used to be a an empty stub.
2003-03-15  Sven Neumann  <sven@gimp.org>

	* app/base/levels.c (levels_adjust_by_colors): implemented this
	function which used to be a an empty stub.

	* app/tools/gimplevelstool.c: implemented the missing
	functionality behind the color picker buttons I added some time
	ago.
2003-03-15 15:02:36 +00:00
Sven Neumann bb2b9f6825 added the API for level correction using black, gray and white point.
2002-10-15  Sven Neumann  <sven@gimp.org>

	* app/base/levels.[ch]: added the API for level correction using
	black, gray and white point.

	* app/tools/gimpcurvestool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimplevelstool.[ch]: misc smaller changes.

	* app/widgets/gimphistogrambox.[ch]: allocate the buffer for the
	gradient preview on size_allocate, not for every expose event.

	* app/widgets/gimphistogramview.c: fixed drawing for width > 256.

	* themes/Default/images/stock-color-picker-white-18.png: tweaked.
2002-10-15 13:36:28 +00:00
Michael Natterer 163a3f4155 More color correction stuff cleanup:
2002-09-04  Michael Natterer  <mitch@gimp.org>

	More color correction stuff cleanup:

	* app/base/Makefile.am
	* app/base/base-types.h
	* app/base/levels.[ch]: new files containing levels_lut_func(), a
	new "Levels" parameter struct and the "auto levels" stuff.

	* app/base/lut-funcs.[ch]: removed the levels stuff here, added
	lots of g_return_if_fail().

	* app/base/color-balance.[ch]
	* app/base/hue-saturation.[ch]: added init() and reset() functions
	so we don't need to duplicate this code in the tool and the pdb
	wrappers.

	* app/base/curves.[ch]: s/gint/GimpHistogramChannel/g, made
	curves_channel_reset() initialize the curves array.

	* app/tools/gimpcolorbalancetool.[ch]: use the new functions,
	moved the "Range" frame to the top, added a per-range "Reset"
	button, made the global "Reset" button reset all ranges and
	the "Preserve Luminosity" toggle.

	* app/tools/gimpcurvestool.[ch]: don't initialize the curves
	array manually, as curves_channel_reset() does that,
	s/gint/GimpHistogramChannel/g.

	* app/tools/gimphuesaturationtool.c: use the new functions, added
	a per-channel "Reset" button and made the global "Reset" button
	reset all channels, cleaned up the GUI update function.

	* app/tools/gimplevelstool.[ch]: changed to use the new Levels
	parameter struct and it's utility functions. Removed stuff
	which now lives in base/levels.c

	* app/tools/gimpimagemaptool.c: align the "Preview" button
	bottom-left, not bottom-right.

	* tools/pdbgen/pdb/color.pdb: use the new stuff and removed
	uglyness because using the "Levels" struct makes the code more
	straightforward.

	* app/pdb/color_cmds.c: regenerated.
2002-09-04 15:25:15 +00:00