color

The color data type is responsible for providing colour conversion features. More...

## Data Structures

struct | stp_colorfuncs_t
struct | stp_color

## Typedefs

typedef struct stp_color | stp_color_t

## Functions

int | stp_color_init (stp_vars_t *v, stp_image_t *image, size_t steps)
int | stp_color_get_row (stp_vars_t *v, stp_image_t *image, int row, unsigned *zero_mask)
stp_parameter_list_t | stp_color_list_parameters (const stp_vars_t *v)
void | stp_color_describe_parameter (const stp_vars_t *v, const char *name, stp_parameter_t *description)
int | stp_color_register (const stp_color_t *color)
int | stp_color_unregister (const stp_color_t *color)
int | stp_color_count (void)
| Get the number of available color modules.
const stp_color_t * | stp_get_color_by_name (const char *name)
| Get a color module by its name.
const stp_color_t * | stp_get_color_by_index (int idx)
| Get a color module by its index number.
const stp_color_t * | stp_get_color_by_colorfuncs (stp_colorfuncs_t *colorfuncs)
const char * | stp_color_get_name (const stp_color_t *c)
| Get the short (untranslated) name of a color module.
const char * | stp_color_get_long_name (const stp_color_t *c)
| Get the long (translated) name of a color module.

## Detailed Description

The color data type is responsible for providing colour conversion features.

Color modules provide the actual functionality, so different colour management modules may provide the application with different services (for example, colour profiles).

## Typedef Documentation

## stp_color_t

typedef struct stp_color stp_color_t

## Function Documentation

## stp_color_count()

int stp_color_count | ( | void |  | ) |

extern

Get the number of available color modules.

Returns
  the number of color modules.

## stp_color_describe_parameter()

void stp_color_describe_parameter | ( | const stp_vars_t * | v,
|  | const char * | name,
|  | stp_parameter_t * | description )

extern

## stp_color_get_long_name()

const char * stp_color_get_long_name | ( | const stp_color_t * | c | ) |

extern

Get the long (translated) name of a color module.

Parameters

  c | the color module to use.

Returns
  the long name.

## stp_color_get_name()

const char * stp_color_get_name | ( | const stp_color_t * | c | ) |

extern

Get the short (untranslated) name of a color module.

Parameters

  c | the color module to use.

Returns
  the short name.

## stp_color_get_row()

int stp_color_get_row | ( | stp_vars_t * | v,
|  | stp_image_t * | image,
|  | int | row,
|  | unsigned * | zero_mask )

extern

## stp_color_init()

int stp_color_init | ( | stp_vars_t * | v,
|  | stp_image_t * | image,
|  | size_t | steps )

extern

## stp_color_list_parameters()

stp_parameter_list_t stp_color_list_parameters | ( | const stp_vars_t * | v | ) |

extern

## stp_color_register()

int stp_color_register | ( | const stp_color_t * | color | ) |

extern

## stp_color_unregister()

int stp_color_unregister | ( | const stp_color_t * | color | ) |

extern

## stp_get_color_by_colorfuncs()

const stp_color_t * stp_get_color_by_colorfuncs | ( | stp_colorfuncs_t * | colorfuncs | ) |

extern

## stp_get_color_by_index()

const stp_color_t * stp_get_color_by_index | ( | int | idx | ) |

extern

Get a color module by its index number.

Parameters

  idx | the index number. This must not be greater than (total number of papers - 1).

Returns
  a pointer to the color module, or NULL on failure.

## stp_get_color_by_name()

const stp_color_t * stp_get_color_by_name | ( | const char * | name | ) |

extern

Get a color module by its name.

Parameters

  name | the short unique name. number of papers - 1).

Returns
  a pointer to the color module, or NULL on failure.