Commit Graph

42 Commits

Author SHA1 Message Date
Alx Sa c36b7d016f libgimpcolor, plug-ins: Remove GimpHSV
This patch replaces all instances of GimpHSV
in the codebase with babl implementations,
so that it can removed as part of the color
space invasion.
2024-08-21 18:57:50 +00:00
Alx Sa 3842efd524 libgimpcolor: Remove GimpCMYK code
Part of the color space invasion API
updates. CMYK conversion should be
done through babl/GEGL now.
2024-06-21 16:00:18 +00:00
Michael Natterer c12c031f2d pdb, libgimp*: add (out caller-allocates) to all GimpRGB* return values 2019-08-01 15:39:13 +02:00
Michael Natterer f8ce6b7440 libgimpcolor: remove deprecated integer RGB <-> HSL conversion functions 2018-10-22 13:29:11 +02:00
Michael Natterer 40df58011f libgimpcolor: remove gimp_rgb_to_hsv_int() and gimp_hsv_to_rgb_int() cruft 2018-10-22 13:06:43 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 1ed586f0f1 libgimpcolor: remove most deprecated cruft, rest to follow 2018-05-20 21:06:29 +02:00
luz.paz 69b2e84924 Source and trivial typos
Found via `codespell` and `grep`
2018-05-12 23:44:47 +02:00
Massimo Valentini f2306abc0a Bug 761170: Warnings building with clang
Fix some of the warnings.
2017-07-15 21:05:56 +02:00
Michael Natterer 3e119c5af7 libgimpcolor: add gimp_rgb[a]_set,get_pixel()
which converts from/to any pixel format using Babl. Added tons of
includes and CFLAGS now that libgimpcolor publically uses Babl.
2012-05-02 17:50:43 +02:00
Mukund Sivaraman 4a686eba0f libgimpcolor: Delete unnecessary h initializer
The -Wall warning is taken care of by
commit 890b9abf94.
2011-10-04 14:40:24 +05:30
Mukund Sivaraman 890b9abf94 libgimpcolor: Remove conditions which are always true 2011-10-01 13:15:18 +05:30
Michael Natterer 7b335188b6 libgimpcolor: fix most gtk-doc warnings 2010-06-29 20:08:39 +02:00
Michael Natterer 1649241483 libgimpcolor: move docs from template files to inline comments
Only added section headers for now, there was nothing else in the
template files.
2010-06-29 19:46:37 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann e2bac9e496 improved procedure blurb and help.
2008-05-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/gbr.c: improved procedure blurb and help.

	* libgimpcolor/gimpcolorspace.c: inline gimp_hsl_value() and
	gimp_hsl_value_int().

svn path=/trunk/; revision=25576
2008-05-06 15:49:41 +00:00
Sven Neumann 48741d2ceb avoid the ambiguity of returning different values for the same color and
2007-09-28  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.c (gimp_hsv_to_rgb_int): avoid the
	ambiguity of returning different values for the same color and
	limit the Hue output range to [0..359].

svn path=/trunk/; revision=23681
2007-09-28 10:46:35 +00:00
Sven Neumann b163dd9579 added a const qualifier.
2006-06-06  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.[ch] (gimp_rgb_to_hsv4): added a
	const qualifier.
2006-06-06 08:35:55 +00:00
Sven Neumann f2df31a50e converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* libgimp*/gimp*.[ch]: converted tabs to spaces.
2006-04-12 10:53:28 +00:00
Sven Neumann c03a5b837e register GimpRGB as a boxed type.
2004-07-26  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb.[ch]: register GimpRGB as a boxed type.

	* libgimpcolor/gimpadaptivesupersample.c
	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimprgb-parse.c
	* libgimp/gimp.h: include <glib-object.h> instead of <glib.h>.
2004-07-26 18:14:48 +00:00
Sven Neumann 70a9a84017 applied patch from Marco Munari that removes a redundant "if" (bug
2004-04-15  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.c (gimp_rgb_to_hsv): applied patch
	from Marco Munari that removes a redundant "if" (bug #133540).
2004-04-15 14:17:51 +00:00
Sven Neumann a0b1dfee7e libgimpcolor/gimpcolorspace.c fixed gtk-doc comments, removed trailing
2003-11-08  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimpcmyk.c: fixed gtk-doc comments, removed
	trailing whitespace.
2003-11-08 22:06:57 +00:00
Dave Neary d38d969e90 Finished gtk-docs. The docs for these could perhaps include formulae, but
2003-11-08  Dave Neary  <bolsh@gimp.org>

	* libgimpcolor/gimpcolorspace.c: Finished gtk-docs. The docs for
	these could perhaps include formulae, but for most of the
	colorspaces that would be the same thing as copying the code
	into a comment, which seems pointless.
2003-11-08 21:26:21 +00:00
Sven Neumann 4c695c22bb some minor code cleanup.
2003-10-17  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c: some minor code cleanup.

	* libgimpcolor/gimpcolorspace.c: removed trailing whitespace.
2003-10-16 22:03:20 +00:00
Dave Neary e53325b500 Corrected mistake - two definitions of gimp_hsl_value (both static). I
2003-10-16  Dave Neary  <bolsh@gimp.org>

        * libgimpcolor/gimpcolorspace.c: Corrected mistake - two
        definitions of gimp_hsl_value (both static). I changed the
        latter to gimp_hsl_value_int.
2003-10-16 20:32:48 +00:00
Dave Neary fb471dabe0 app/base/color-balance.c app/base/hue-saturation.c
2003-10-16  Dave Neary  <bolsh@gimp.org>

        * app/base/color-balance.c
        * app/base/hue-saturation.c
        * app/composite/gimp-composite-generic.c
        * app/paint-funcs/paint-funcs-generic.h
        * app/tools/gimphuesaturationtool.c
        * libgimpcolor/gimpcolorspace.[ch]: Changed all occurrences of
        gimp_rgb_to_hls_int and gimp_hls_to_rgb_int to
        gimp_rgb_to_hsl_int and gimp_hsl_to_rgb_int respectively. This
        closes bug #124661.
2003-10-16 19:17:08 +00:00
Dave Neary 4cfb8d3dcd Some more gtkdocs.
2003-10-14  Dave Neary  <bolsh@gimp.org>

        * libgimpcolor/gimpcolorspace.c: Some more gtkdocs.
2003-10-14 21:54:42 +00:00
Dave Neary fad03466b7 Added gtk-docs to a few functions.
2003-10-13  Dave Neary  <bolsh@gimp.org>

        * libgimpcolor/gimpcolorspace.c: Added gtk-docs to a few functions.
2003-10-13 20:56:33 +00:00
Sven Neumann 443a5f3fd2 made pullout a percentage instead of a maximal value. (gimp_rgb_to_cmyk):
2003-09-03  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.[ch] (gimp_rgb_to_cmyk_int): made
	pullout a percentage instead of a maximal value.
	(gimp_rgb_to_cmyk): added a pullout parameter here as well.

	* app/gui/info-window.c
	* plug-ins/common/newsprint.c: changed accordingly.

	* modules/colorsel_cmyk.c: allow to specify the amount of black
	pulled out when converting to CMYK.
2003-09-02 22:52:25 +00:00
Sven Neumann 84fd11ad0a allow to specify the amount of black pullout. Documented the function.
2003-09-02  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.c (gimp_rgb_to_cmyk_int): allow to
	specify the amount of black pullout. Documented the function.

	* plug-ins/common/newsprint.c: use the RGB to CMYK routine from
	libgimpcolor.
2003-09-02 18:35:35 +00:00
Sven Neumann d93c2f61c8 applied a patch from S. Mukund that fixes the gimp_hsv_to_rgb_int() and
2003-08-31  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.c: applied a patch from S. Mukund
	that fixes the gimp_hsv_to_rgb_int() and gimp_rgb_to_hsv_int()
	functions (bug #115626).
2003-08-31 16:20:12 +00:00
Sven Neumann f357b2cde0 libgimpcolor/Makefile.am libgimpcolor/makefile.msc new files that define a
2003-07-14  Sven Neumann  <sven@gimp.org>

        * libgimpcolor/Makefile.am
        * libgimpcolor/makefile.msc
        * libgimpcolor/gimpcmyk.[ch]: new files that define a GimpCMYK
        structure similar to GimpRGB.

        * libgimpcolor/gimpcolortypes.h: added the GimpCMYK typedef.

        * libgimpcolor/gimpcolorspace.[ch]: added conversions between RGB
        and CMYK. This implementation is the naive approach without any
        color calibration whatsoever.

        * libgimpcolor/gimphsv.[ch]
        * libgimpcolor/gimprgb.[ch]: purely cosmetic changes.
2003-07-14 20:15:43 +00:00
Sven Neumann f32424aac5 removed calls to ROUND() in two places where they should not have been
2003-06-21  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.c (gimp_hsv_to_rgb_int): removed
	calls to ROUND() in two places where they should not have been
	added. Fixes bug #115626.
2003-06-20 22:12:18 +00:00
Sven Neumann 98fc5e380e Applied a patch from S. Mukund <muks@mukund.org> fixing rounding problems
2003-06-16  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.c: Applied a patch from S. Mukund
	<muks@mukund.org> fixing rounding problems that caused bug #55261.
2003-06-16 17:30:06 +00:00
Sven Neumann aa4448db64 app/gui/info-window.c libgimpcolor/gimpcolorspace.c libgimpcolor/gimprgb.c
2003-06-13  Sven Neumann  <sven@gimp.org>

	* app/gui/info-window.c
	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimprgb.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c: use ROUND() where appropriate.

	* libgimpwidgets/gimpcolorarea.c (gimp_color_area_render): use
	gimp_rgb_get_uchar().
2003-06-13 16:44:21 +00:00
Sven Neumann 08879c9f90 app/gui/info-window.c libgimpwidgets/gimpcolorscales.c applied some
2003-06-11  Sven Neumann  <sven@gimp.org>

	* app/gui/info-window.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c: applied some slightly modified
	patches from Michael Bushey that fix rounding errors when
	converting between color values in gdouble and guchar
	representation (bug #109241).

	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimprgb.c: similar fixes here.
2003-06-11 15:55:48 +00:00
Michael Natterer fc6ddb0540 removed redundant functions gimp_rgb_to_hsv_double() and
2003-05-20  Michael Natterer  <mitch@gimp.org>

	* libgimpcolor/gimpcolorspace.[ch]: removed redundant functions
	gimp_rgb_to_hsv_double() and gimp_hsv_to_rgb_double().

	* app/core/gimpdrawable-blend.c: use gimp_rgb_to_hsv() and
	gimp_hsv_to_rgb() instead.

	* plug-ins/fp/fp.[ch]
	* plug-ins/fp/fp_misc.c: ditto. Deuglyfied the changed functions'
	coding style a lot.
2003-05-20 18:29:13 +00:00
Michael Natterer 470947f911 Some color API cleanup:
2003-05-20  Michael Natterer  <mitch@gimp.org>

	Some color API cleanup:

	* libgimpcolor/gimpcolortypes.h: added struct GimpHSL. All values
	are doubles in a [0.0..1.0] range.

	* libgimpcolor/gimpcolorspace.[ch]: changed the GimpRGB <-> HSL
	functions to use the new struct instead of separate hue, saturation
	and lightness doubles. Note that the hue range has changed from
	[0.0..360.0] to [0.0..1.0].

	* app/base/colorize.c (colorize_calculate)
	* plug-ins/common/AlienMap2.c (transform): changed accordingly.
2003-05-20 10:20:34 +00:00
Michael Natterer 49b851780e fixed to work like gimp_hls_to_rgb_int() (does the right thing now for the
2003-05-19  Michael Natterer  <mitch@gimp.org>

	* libgimpcolor/gimpcolorspace.c (gimp_hsl_to_rgb): fixed to work
	like gimp_hls_to_rgb_int() (does the right thing now for the
	saturation == 0 case). Some minor cleanups.

	Implemented "Colorize" as suggested in bug #20509. It's not a
	toggle in the "Hue/Saturation" tool dialog (which would be a gross
	hack IMHO) but a separate tool. Fixes bug #20509.

	* app/base/Makefile.am
	* app/base/base-types.h
	* app/base/colorize.[ch]: the actual mapping function lives
	here. Its algorithm was taken from the "colorify" plug-in.

	* app/tools/Makefile.am
	* app/tools/gimpcolorizetool.[ch]: the tool.

	* app/tools/tools.c: register it.

	* app/gui/dialogs.c: session-manage its dialog.

	* libgimpwidgets/gimpstock.[ch]
	* themes/Default/images/Makefile.am
	* themes/Default/images/tools/stock-tool-colorize-16.png
	* themes/Default/images/tools/stock-tool-colorize-22.png: new
	icons from Jimmac.

	Unrelated:

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: don't #include "tool_manager.h"
2003-05-19 14:21:03 +00:00
Maurits Rijk 9732da6fe2 Code clean-up in AlienMap2 plug-in. Added mnemonics (#80804) and fixed bug in gimp_hsl_to_rgb. 2002-06-21 21:27:37 +00:00
Michael Natterer cb16697229 Makefile.am configure.in added stuff for the new library below.
2001-01-24  Michael Natterer  <mitch@gimp.org>

	* Makefile.am
	* configure.in
	* gimptool.in: added stuff for the new library below.

	* libgimpmath/.cvsignore
	* libgimpmath/Makefile.am
	* libgimpmath/gimpmath.def
	* libgimpmath/gimpmath.h
	* libgimpmath/gimpmathtypes.h
	* libgimpmath/gimpmatrix.c
	* libgimpmath/gimpmatrix.h
	* libgimpmath/gimpvector.c
	* libgimpmath/gimpvector.h
	* libgimpmath/makefile.mingw.in
	* libgimpmath/makefile.msc: new shared library. Depends on glib only.

	* libgimp/Makefile.am
	* libgimp/gimp.def
	* libgimp/gimp.h: removed the math stuff.

	* libgimp/gimpmath.h
	* libgimp/gimpmatrix.[ch]
	* libgimp/gimpvector.[ch]: removed.

	* app/Makefile.am
	* plug-ins/Lighting/Makefile.am
	* plug-ins/MapObject/Makefile.am
	* plug-ins/pagecurl/Makefile.am: link against libgimpmath.la

	* app/[many files]
	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimprgb.c
	* libgimp/gimpadaptivesupersample.c
	* libgimp/gimpbilinear.c
	* libgimp/gimpwidgets.c
	* modules/colorsel_gtk.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c
	* plug-ins/libgck/gck/gckcolor.c
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/image.pdb: include "libgimpmath/gimpmath.h",
	removed the remaining includes of the old color stuff.
2001-01-23 23:56:18 +00:00
Michael Natterer e803beddd4 Makefile.am configure.in added stuff for the new library below.
2001-01-23  Michael Natterer  <mitch@gimp.org>

	* Makefile.am
	* configure.in
	* gimptool.in: added stuff for the new library below.

	* libgimpcolor/.cvsignore
	* libgimpcolor/Makefile.am
	* libgimpcolor/gimpcolor.h
	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimpcolorspace.h
	* libgimpcolor/gimpcolortypes.h
	* libgimpcolor/gimphsv.c
	* libgimpcolor/gimphsv.h
	* libgimpcolor/gimprgb.c
	* libgimpcolor/gimprgb.h: new shared library which both the app
	and plug-ins link against. The library depends only on glib.

	* libgimpcolor/gimpcolor.def
	* libgimpcolor/makefile.mingw.in
	* libgimpcolor/makefile.msc: added Win32 build files which
	definitely don't work.

	* libgimp/Makefile.am
	* libgimp/gimpcolor.[ch]
	* libgimp/gimpcolorspace.[ch]: removed.

	* libgimp/gimp.h
	* libgimp/gimpadaptivesupersample.c
	* libgimp/gimpbilinear.c
	* libgimp/gimppalette.c
	* libgimp/gimptypes.h: include the stuff from libgimpcolor.

	Plug-Ins don't need to include <libgimpcolor/gimpcolor.h>
	explicitely. LibGimp depends on libgimpcolor and thus also includes
	it's headers.

	* libgimp/gimp.def
	* libgimp/makefile.mingw.in: fiddled around with Win32 stuff...

	* app/Makefile.am: link against libgimpcolor.la

	* app/apptypes.h: include "libgimpcolor/gimpcolortypes.h"

	* app/asupsample.c
	* app/channels_dialog.c
	* app/colormap_dialog.c
	* app/commands.c
	* app/convert.c
	* app/devices.c
	* app/disp_callbacks.c
	* app/drawable.c
	* app/gimpcontext.c
	* app/gimpdnd.c
	* app/gimpimage.c
	* app/gimppalette.c
	* app/gimprc.c
	* app/gradient.c
	* app/libgimp_glue.c
	* app/palette.c
	* app/palette_import.c
	* app/qmask.c
	* app/xcf.c
	* app/tools/paint_core.c
	* app/tools/paintbrush.c
	* app/tools/pencil.c: include "libgimpcolor/gimpcolor.h" before all
	gimp includes because it's a standalone library.

	* plug-ins/FractalExplorer/Makefile.am
	* plug-ins/Lighting/Makefile.am
	* plug-ins/MapObject/Makefile.am
	* plug-ins/bmp/Makefile.am
	* plug-ins/common/Makefile.am
	* plug-ins/common/mkgen.pl
	* plug-ins/dbbrowser/Makefile.am
	* plug-ins/faxg3/Makefile.am
	* plug-ins/fits/Makefile.am
	* plug-ins/flame/Makefile.am
	* plug-ins/fp/Makefile.am
	* plug-ins/gap/Makefile.am
	* plug-ins/gdyntext/Makefile.am
	* plug-ins/gfig/Makefile.am
	* plug-ins/gflare/Makefile.am
	* plug-ins/gfli/Makefile.am
	* plug-ins/gimpressionist/Makefile.am
	* plug-ins/helpbrowser/Makefile.am
	* plug-ins/ifscompose/Makefile.am
	* plug-ins/imagemap/Makefile.am
	* plug-ins/maze/Makefile.am
	* plug-ins/mosaic/Makefile.am
	* plug-ins/pagecurl/Makefile.am
	* plug-ins/print/Makefile.am
	* plug-ins/rcm/Makefile.am
	* plug-ins/script-fu/Makefile.am
	* plug-ins/sel2path/Makefile.am
	* plug-ins/sgi/Makefile.am
	* plug-ins/webbrowser/Makefile.am
	* plug-ins/xjt/Makefile.am: add libgimpcolor.la to LDADD.

	* INSTALL: don't recommend to --disable-shared for development.

	* TODO.xml: increased some percentages, added plug-in help stuff.
2001-01-23 18:49:44 +00:00