Implementation of pluggable color manager nodes. More...
Data Structures | |
| struct | AtColorManagerNodeMethods |
| Color Manager Node methods structure. More... | |
Macros | |
| #define | AI_COLOR_MANAGER_NODE_EXPORT_METHODS(tag) |
| Color manager node methods exporter. More... | |
Functions | |
| AtChannelLayout::AtChannelLayout (uint8_t ct, uint8_t t, size_t x, size_t y) | |
Variables | |
| uint8_t | AtChannelLayout::channel_type |
| uint8_t | AtChannelLayout::type |
| size_t | AtChannelLayout::x_stride |
| size_t | AtChannelLayout::y_stride |
| bool(* | AtColorManagerNodeMethods::ColorManagerTransform )(AtNode *, AtString, bool, bool, const AtBBox2 *, void *, const AtChannelLayout *, void *, const AtChannelLayout *) |
| void(* | AtColorManagerNodeMethods::ColorManagerGetDefaults )(AtNode *, AtString &, AtString &) |
| bool(* | AtColorManagerNodeMethods::ColorManagerGetChromaticities )(AtNode *, AtString, float *) |
| void(* | AtColorManagerNodeMethods::ColorManagerGetCustomAttributes )(AtNode *, AtString, int &, const char **) |
| int(* | AtColorManagerNodeMethods::ColorManagerGetNumColorSpaces )(AtNode *, AtString) |
| AtString(* | AtColorManagerNodeMethods::ColorManagerGetColorSpaceNameByIndex )(AtNode *, int i, AtString) |
| int(* | AtColorManagerNodeMethods::ColorManagerGetNumFamilies )(AtNode *) |
| AtString(* | AtColorManagerNodeMethods::ColorManagerGetFamilyNameByIndex )(AtNode *, int) |
| bool(* | AtColorManagerNodeMethods::ColorManagerColorSpaceIsLinear )(AtNode *, AtString) |
Node Method Declarations | |
| AI_API bool | AiColorManagerTransform (AtNode *node, AtString name, bool is_output=true, bool dither=false, const AtBBox2 *roi=NULL, void *src=NULL, const AtChannelLayout *src_layout=NULL, void *dst=NULL, const AtChannelLayout *dst_layout=NULL) |
| Transform to or from the specified color space. More... | |
| AI_API void | AiColorManagerGetDefaults (AtNode *node, AtString &sRGB, AtString &linear) |
| Get the default linear color space used for rendering and for narrow image formats IO. More... | |
| AI_API bool | AiColorManagerGetChromaticities (AtNode *node, AtString space, float *chromaticities) |
| Get the chromaticities for a color space. More... | |
| AI_API void | AiColorManagerGetCustomAttributes (AtNode *node, AtString space, int &num, const char **attributes) |
| Get custom attributes to include in output file for the given color space, this includes ICC profile, etc... More... | |
| AI_API int | AiColorManagerGetNumColorSpaces (AtNode *node, AtString family=AtString()) |
| Get how many color spaces are available (for a "family" if specified) More... | |
| AI_API AtString | AiColorManagerGetColorSpaceNameByIndex (AtNode *node, int i, AtString family=AtString()) |
| Get the name of a color space by index (for a "family" if specified) More... | |
| AI_API int | AiColorManagerGetNumFamilies (AtNode *node) |
| Get how many color space families are available. More... | |
| AI_API AtString | AiColorManagerGetFamilyNameByIndex (AtNode *node, int i) |
| Get the name of a color space family by index. More... | |
| AI_API bool | AiColorManagerColorSpaceIsLinear (AtNode *node, AtString cs) |
| Return if a given color space is linear according to the color manager. More... | |
| #define | color_manager_transform |
| Color Manager's color_manager_transform method declaration. More... | |
| #define | color_manager_get_defaults static void ColorManagerGetDefaults(AtNode* node, AtString &sRGB, AtString &linear) |
| Color Manager's color_manager_get_defaults method declaration. More... | |
| #define | color_manager_get_chromaticities static bool ColorManagerGetChromaticities(AtNode* node, AtString space, float *chromaticities) |
| Color Manager's color_manager_get_chromaticities method declaration. More... | |
| #define | color_manager_get_custom_attributes static void ColorManagerGetCustomAttributes(AtNode* node, AtString space, int &num, const char **attributes) |
| Color Manager's color_manager_get_custom_attributes method declaration. | |
| #define | color_manager_get_num_color_spaces static int ColorManagerGetNumColorSpaces(AtNode *node, AtString family) |
| Color Manager's color_manager_get_num_color_spaces method declaration. More... | |
| #define | color_manager_get_color_space_name_by_index static AtString ColorManagerGetColorSpaceNameByIndex(AtNode *node, int i, AtString family) |
| Color Manager's color_manager_get_color_space_name_by_index method declaration. More... | |
| #define | color_manager_get_num_families |
| Color Manager's color_manager_get_num_families method declaration. More... | |
| #define | color_manager_get_family_name_by_index |
| Color Manager's color_manager_get_family_name_by_index method declaration. More... | |
| #define | color_manager_color_space_is_linear |
| Color Manager's color_manager_color_space_is_linear method declaration. More... | |
Implementation of pluggable color manager nodes.
| #define AI_COLOR_MANAGER_NODE_EXPORT_METHODS | ( | tag | ) |
Color manager node methods exporter.
| #define color_manager_transform |
Color Manager's color_manager_transform method declaration.
Convert the specified count of RGB colors using the named color space for output or input.
| #define color_manager_get_defaults static void ColorManagerGetDefaults(AtNode* node, AtString &sRGB, AtString &linear) |
Color Manager's color_manager_get_defaults method declaration.
Optionally specify color spaces for 8 bit images (typically sRGB) and for the default linear color space
| #define color_manager_get_chromaticities static bool ColorManagerGetChromaticities(AtNode* node, AtString space, float *chromaticities) |
Color Manager's color_manager_get_chromaticities method declaration.
| #define color_manager_get_num_color_spaces static int ColorManagerGetNumColorSpaces(AtNode *node, AtString family) |
Color Manager's color_manager_get_num_color_spaces method declaration.
| #define color_manager_get_color_space_name_by_index static AtString ColorManagerGetColorSpaceNameByIndex(AtNode *node, int i, AtString family) |
Color Manager's color_manager_get_color_space_name_by_index method declaration.
| #define color_manager_get_num_families |
Color Manager's color_manager_get_num_families method declaration.
| #define color_manager_get_family_name_by_index |
Color Manager's color_manager_get_family_name_by_index method declaration.
| #define color_manager_color_space_is_linear |
Color Manager's color_manager_color_space_is_linear method declaration.
| AI_API bool AiColorManagerTransform | ( | AtNode * | node, |
| AtString | color_space, | ||
| bool | is_output, | ||
| bool | dither, | ||
| const AtBBox2 * | roi_, | ||
| void * | src_, | ||
| const AtChannelLayout * | src_layout_, | ||
| void * | dst_, | ||
| const AtChannelLayout * | dst_layout_ | ||
| ) |
Transform to or from the specified color space.
The transformation will happen between color_space and the working linear color space. You can check if a color transform is available by omitting the values and count params.
| node | The color manager that will perform the transformation, typically the one specified in options->color_manager. If this is NULL, the default built-in color manager will be used, which only supports 'sRGB', 'Rec709' (both gamma) and 'linear' |
| color_space | The destination or source color space |
| is_output | If true, RGB values will be converted TO color_space, otherwise they will be converted FROM color_space |
| dither | Perform dithering for 8 or 16 bit outputs. |
| roi | Region of Interest. By default only one RGB value will be transformed, |
| src | Source RGB buffer. If NULL the color manager will just check if the specified transform exists. |
| src_layout | Description for input RGB buffer layout. If not specified, float RGB will be assumed. |
| dst | Destination RGB buffer. If not specified transform will happen in place with the given src_layout. |
| dst_layout | Description for output RGB buffer layout, if not specified src_layout will be used. |
Get the default linear color space used for rendering and for narrow image formats IO.
This returns the color manager's preferred color space for 8 or 16 bit formats, and the default linear color space.
| node | The color manager If this is NULL, the default built-in color manager will be used, which will use 'sRGB' and 'linear' spaces | |
| [out] | sRGB | Name for sRGB color space, used for 8-16 bit file output, typically sRGB |
| [out] | linear | Name of linear rendering color space |
| AI_API bool AiColorManagerGetChromaticities | ( | AtNode * | node, |
| AtString | color_space, | ||
| float * | chromaticities | ||
| ) |
Get the chromaticities for a color space.
This returns the color manager's preferred color space for 8 or 16 bit formats, and the default linear color space.
| node | The color manager If this is NULL, the default built-in color manager will be used | |
| color_space | Name of color space we are querying | |
| [out] | chromaticities | 8 float array for chromaticities and white point |
| AI_API void AiColorManagerGetCustomAttributes | ( | AtNode * | node, |
| AtString | color_space, | ||
| int & | num, | ||
| const char ** | attributes | ||
| ) |
Get custom attributes to include in output file for the given color space, this includes ICC profile, etc...
| node | The color manager If this is NULL, the default built-in color manager will be used | |
| color_space | Name of color space we are querying | |
| [out] | num | Number of custom attributes to output |
| [out] | attributes | Array of strings defining all custom attributes in OIIO format: "<type> <name> <value>" |
Get how many color spaces are available (for a "family" if specified)
| node | The color manager If this is NULL, the default built-in color manager will be used |
| family | If specified will only return the number of color spaces for that color space "family". The meaning of "family" is left to the color manager. |
Get the name of a color space by index (for a "family" if specified)
| node | The color manager If this is NULL, the default built-in color manager will be used |
| i | Index we are querying for |
| family | If specified will return the color space at the given index for that "family". The meaning of "family" is left to the color manager. |
| AI_API int AiColorManagerGetNumFamilies | ( | AtNode * | node | ) |
Get how many color space families are available.
| node | The color manager If this is NULL, the default built-in color manager will be used |
Get the name of a color space family by index.
| node | The color manager If this is NULL, the default built-in color manager will be used |
| i | Index we are querying for |
Return if a given color space is linear according to the color manager.
| node | The color manager If this is NULL, the default built-in color manager will be used |
| cs | Color Space Name to check |