GimpColorSpace

Name

GimpColorSpace -- Utility functions which convert colors between different color models.

Synopsis



void        gimp_rgb_to_hsv                 (const GimpRGB *rgb,
                                             GimpHSV *hsv);
void        gimp_rgb_to_hsl                 (const GimpRGB *rgb,
                                             gdouble *hue,
                                             gdouble *saturation,
                                             gdouble *lightness);
void        gimp_hsv_to_rgb                 (const GimpHSV *hsv,
                                             GimpRGB *rgb);
void        gimp_hsl_to_rgb                 (gdouble hue,
                                             gdouble saturation,
                                             gdouble lightness,
                                             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);
void        gimp_rgb_to_hsv_int             (gint *red,
                                             gint *green,
                                             gint *blue);
void        gimp_hsv_to_rgb_int             (gint *hue,
                                             gint *saturation,
                                             gint *value);
void        gimp_rgb_to_hls_int             (gint *red,
                                             gint *green,
                                             gint *blue);
gint        gimp_rgb_to_l_int               (gint red,
                                             gint green,
                                             gint blue);
void        gimp_hls_to_rgb_int             (gint *hue,
                                             gint *lightness,
                                             gint *saturation);
void        gimp_rgb_to_hsv_double          (gdouble *red,
                                             gdouble *green,
                                             gdouble *blue);
void        gimp_hsv_to_rgb_double          (gdouble *hue,
                                             gdouble *saturation,
                                             gdouble *value);
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);

Description

When programming pixel data manipulation functions you will often use algorithms operating on a color model different from the one GIMP uses. This file provides utility functions to concert colors between different color spaces.

Details

gimp_rgb_to_hsv ()

void        gimp_rgb_to_hsv                 (const GimpRGB *rgb,
                                             GimpHSV *hsv);


gimp_rgb_to_hsl ()

void        gimp_rgb_to_hsl                 (const GimpRGB *rgb,
                                             gdouble *hue,
                                             gdouble *saturation,
                                             gdouble *lightness);


gimp_hsv_to_rgb ()

void        gimp_hsv_to_rgb                 (const GimpHSV *hsv,
                                             GimpRGB *rgb);


gimp_hsl_to_rgb ()

void        gimp_hsl_to_rgb                 (gdouble hue,
                                             gdouble saturation,
                                             gdouble lightness,
                                             GimpRGB *rgb);


gimp_rgb_to_hwb ()

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


gimp_hwb_to_rgb ()

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


gimp_rgb_to_hsv_int ()

void        gimp_rgb_to_hsv_int             (gint *red,
                                             gint *green,
                                             gint *blue);


gimp_hsv_to_rgb_int ()

void        gimp_hsv_to_rgb_int             (gint *hue,
                                             gint *saturation,
                                             gint *value);


gimp_rgb_to_hls_int ()

void        gimp_rgb_to_hls_int             (gint *red,
                                             gint *green,
                                             gint *blue);


gimp_rgb_to_l_int ()

gint        gimp_rgb_to_l_int               (gint red,
                                             gint green,
                                             gint blue);


gimp_hls_to_rgb_int ()

void        gimp_hls_to_rgb_int             (gint *hue,
                                             gint *lightness,
                                             gint *saturation);


gimp_rgb_to_hsv_double ()

void        gimp_rgb_to_hsv_double          (gdouble *red,
                                             gdouble *green,
                                             gdouble *blue);


gimp_hsv_to_rgb_double ()

void        gimp_hsv_to_rgb_double          (gdouble *hue,
                                             gdouble *saturation,
                                             gdouble *value);


gimp_rgb_to_hsv4 ()

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


gimp_hsv_to_rgb4 ()

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