From 2baa9bd9cd9a5365b6b826de2377a6a29ff1dd3b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 14 Jun 2017 21:04:36 +0200 Subject: Add YES colour model, generate the conversion matrices, and add more direct conversions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcolour.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'libcolour.h') diff --git a/libcolour.h b/libcolour.h index 51dfaa8..8d7ae4f 100644 --- a/libcolour.h +++ b/libcolour.h @@ -162,7 +162,8 @@ _(LIBCOLOUR_YPBPR, libcolour_ypbpr_##RES##_t, ypbpr, __VA_ARGS__)\ _(LIBCOLOUR_YCGCO, libcolour_ycgco_##RES##_t, ycgco, __VA_ARGS__)\ _(LIBCOLOUR_CIE1960UCS, libcolour_cie1960ucs_##RES##_t, cie1960ucs, __VA_ARGS__)\ - _(LIBCOLOUR_CIEUVW, libcolour_cieuvw_##RES##_t, cieuvw, __VA_ARGS__) + _(LIBCOLOUR_CIEUVW, libcolour_cieuvw_##RES##_t, cieuvw, __VA_ARGS__)\ + _(LIBCOLOUR_YES, libcolour_yes_##RES##_t, yes, __VA_ARGS__) #define LIBCOLOUR_LIST_MODELS(_, RES)\ _(LIBCOLOUR_RGB, libcolour_rgb_##RES##_t, rgb)\ @@ -178,7 +179,8 @@ _(LIBCOLOUR_YPBPR, libcolour_ypbpr_##RES##_t, ypbpr)\ _(LIBCOLOUR_YCGCO, libcolour_ycgco_##RES##_t, ycgco)\ _(LIBCOLOUR_CIE1960UCS, libcolour_cie1960ucs_##RES##_t, cie1960ucs)\ - _(LIBCOLOUR_CIEUVW, libcolour_cieuvw_##RES##_t, cieuvw) + _(LIBCOLOUR_CIEUVW, libcolour_cieuvw_##RES##_t, cieuvw)\ + _(LIBCOLOUR_YES, libcolour_yes_##RES##_t, yes) #define LIBCOLOUR_RGB LIBCOLOUR_RGB @@ -195,6 +197,7 @@ #define LIBCOLOUR_YCGCO LIBCOLOUR_YCGCO #define LIBCOLOUR_CIE1960UCS LIBCOLOUR_CIE1960UCS #define LIBCOLOUR_CIEUVW LIBCOLOUR_CIEUVW +#define LIBCOLOUR_YES LIBCOLOUR_YES typedef enum libcolour_model { @@ -405,6 +408,13 @@ typedef struct libcolour_cielchuv_##RES {\ TYPE one_revolution;\ } libcolour_cielchuv_##RES##_t;\ \ +typedef struct libcolour_yes_##RES {\ + enum libcolour_model model;\ + TYPE Y;\ + TYPE E;\ + TYPE S;\ +} libcolour_yes_##RES##_t;\ +\ typedef struct libcolour_rgb_##RES {\ enum libcolour_model model;\ TYPE R;\ -- cgit v1.2.3-70-g09d2