GimpCMYK

GimpCMYK — Definitions and Functions relating to CMYK colors.

Functions

Types and Values

struct GimpCMYK
#define GIMP_TYPE_CMYK

Description

Definitions and Functions relating to CMYK colors.

Functions

gimp_cmyk_set ()

void
gimp_cmyk_set (GimpCMYK *cmyk,
               gdouble cyan,
               gdouble magenta,
               gdouble yellow,
               gdouble black);

Very basic initialiser for the internal GimpCMYK structure. Channel values are doubles in the range 0 to 1.

Parameters

cmyk

A GimpCMYK structure which will hold the specified CMYK value.

 

cyan

The Cyan channel of the CMYK value

 

magenta

The Magenta channel

 

yellow

The Yellow channel

 

black

The blacK channel

 

gimp_cmyk_set_uchar ()

void
gimp_cmyk_set_uchar (GimpCMYK *cmyk,
                     guchar cyan,
                     guchar magenta,
                     guchar yellow,
                     guchar black);

The same as gimp_cmyk_set(), except that channel values are unsigned chars in the range 0 to 255.

Parameters

cmyk

A GimpCMYK structure which will hold the specified CMYK value.

 

cyan

The Cyan channel of the CMYK value

 

magenta

The Magenta channel

 

yellow

The Yellow channel

 

black

The blacK channel

 

gimp_cmyk_get_uchar ()

void
gimp_cmyk_get_uchar (const GimpCMYK *cmyk,
                     guchar *cyan,
                     guchar *magenta,
                     guchar *yellow,
                     guchar *black);

Retrieve individual channel values from a GimpCMYK structure. Channel values are pointers to unsigned chars in the range 0 to 255.

Parameters

cmyk

A GimpCMYK structure which will hold the specified CMYK value.

 

cyan

The Cyan channel of the CMYK value

 

magenta

The Magenta channel

 

yellow

The Yellow channel

 

black

The blacK channel

 

gimp_cmyka_set ()

void
gimp_cmyka_set (GimpCMYK *cmyka,
                gdouble cyan,
                gdouble magenta,
                gdouble yellow,
                gdouble black,
                gdouble alpha);

Initialiser for the internal GimpCMYK structure. Channel values are doubles in the range 0 to 1.

Parameters

cmyka

A GimpCMYK structure which will hold the specified CMYKA value.

 

cyan

The Cyan channel of the CMYK value

 

magenta

The Magenta channel

 

yellow

The Yellow channel

 

black

The blacK channel

 

alpha

The Alpha channel

 

gimp_cmyka_set_uchar ()

void
gimp_cmyka_set_uchar (GimpCMYK *cmyka,
                      guchar cyan,
                      guchar magenta,
                      guchar yellow,
                      guchar black,
                      guchar alpha);

The same as gimp_cmyka_set(), except that channel values are unsigned chars in the range 0 to 255.

Parameters

cmyka

A GimpCMYK structure which will hold the specified CMYKA value.

 

cyan

The Cyan channel of the CMYK value

 

magenta

The Magenta channel

 

yellow

The Yellow channel

 

black

The blacK channel

 

alpha

The Alpha channel

 

gimp_cmyka_get_uchar ()

void
gimp_cmyka_get_uchar (const GimpCMYK *cmyka,
                      guchar *cyan,
                      guchar *magenta,
                      guchar *yellow,
                      guchar *black,
                      guchar *alpha);

Retrieve individual channel values from a GimpCMYK structure. Channel values are pointers to unsigned chars in the range 0 to 255.

Parameters

cmyka

A GimpCMYK structure which will hold the specified CMYKA value.

 

cyan

The Cyan channel of the CMYK value

 

magenta

The Magenta channel

 

yellow

The Yellow channel

 

black

The blacK channel

 

alpha

The Alpha channel

 

Types and Values

struct GimpCMYK

struct GimpCMYK {
  gdouble c, m, y, k, a;
};

Used to keep CMYK and CMYKA colors. All components are in a range of [0.0..1.0]. An alpha value is somewhat useless in the CMYK colorspace, but we keep one around anyway so color conversions going to CMYK and back can preserve alpha.

Members

gdouble c;

the cyan component

 

gdouble m;

the magenta component

 

gdouble y;

the yellow component

 

gdouble k;

the black component

 

gdouble a;

the alpha component

 

GIMP_TYPE_CMYK

#define GIMP_TYPE_CMYK       (gimp_cmyk_get_type ())