File: gimpcolorspace.h

package info (click to toggle)
gimp 2.2.6-1sarge4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 97,088 kB
  • ctags: 43,756
  • sloc: ansic: 525,782; xml: 36,543; lisp: 9,851; sh: 9,007; makefile: 7,974; python: 2,622; perl: 2,589; yacc: 520; lex: 334
file content (101 lines) | stat: -rw-r--r-- 3,814 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __GIMP_COLOR_SPACE_H__
#define __GIMP_COLOR_SPACE_H__

G_BEGIN_DECLS

/* For information look into the C source or the html documentation */


/*  Color conversion routines  */


/*  GimpRGB function  */

void   gimp_rgb_to_hsv          (const GimpRGB  *rgb,
				 GimpHSV        *hsv);
void   gimp_rgb_to_hsl          (const GimpRGB  *rgb,
				 GimpHSL        *hsl);
void   gimp_rgb_to_cmyk         (const GimpRGB  *rgb,
                                 gdouble         pullout,
                                 GimpCMYK       *cmyk);

void   gimp_hsv_to_rgb          (const GimpHSV  *hsv,
				 GimpRGB        *rgb);
void   gimp_hsl_to_rgb          (const GimpHSL  *hsl,
				 GimpRGB        *rgb);
void   gimp_cmyk_to_rgb         (const GimpCMYK *cmyk,
                                 GimpRGB        *rgb);

void   gimp_rgb_to_hwb          (const GimpRGB  *rgb,
				 gdouble        *hue,
				 gdouble        *whiteness,
				 gdouble        *blackness);
void   gimp_hwb_to_rgb          (gdouble         hue,
				 gdouble         whiteness,
				 gdouble         blackness,
				 GimpRGB        *rgb);


/*  gint functions  */

void    gimp_rgb_to_hsv_int	(gint    *red         /* returns hue        */,
				 gint    *green       /* returns saturation */,
				 gint    *blue        /* returns value      */);
void    gimp_hsv_to_rgb_int	(gint    *hue         /* returns red        */,
				 gint    *saturation  /* returns green      */,
				 gint    *value       /* returns blue       */);

void    gimp_rgb_to_cmyk_int    (gint    *red         /* returns cyan       */,
                                 gint    *green       /* returns magenta    */,
                                 gint    *blue        /* returns yellow     */,
                                 gint    *pullout     /* returns black      */);
void    gimp_cmyk_to_rgb_int    (gint    *cyan        /* returns red        */,
                                 gint    *magenta     /* returns green      */,
                                 gint    *yellow      /* returns blue       */,
                                 gint    *black       /* not changed        */);

void    gimp_rgb_to_hsl_int	(gint    *red         /* returns hue        */,
				 gint    *green       /* returns saturation */,
				 gint    *blue        /* returns lightness  */);
gint    gimp_rgb_to_l_int	(gint     red,
				 gint     green,
				 gint     blue);
void    gimp_hsl_to_rgb_int	(gint    *hue         /* returns red        */,
				 gint    *saturation  /* returns green      */,
				 gint    *lightness   /* returns blue       */);


/*  gdouble functions  */

void    gimp_rgb_to_hsv4        (guchar  *rgb,
                                 gdouble *hue,
                                 gdouble *saturation,
                                 gdouble *value);
void    gimp_hsv_to_rgb4        (guchar  *rgb,
				 gdouble  hue,
				 gdouble  saturation,
				 gdouble  value);


G_END_DECLS

#endif  /* __GIMP_COLOR_SPACE_H__ */