diff options
Diffstat (limited to '')
-rw-r--r-- | src/libcolour.c | 8 | ||||
-rw-r--r-- | src/libcolour.h | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/libcolour.c b/src/libcolour.c index 7799534..b6c6e5b 100644 --- a/src/libcolour.c +++ b/src/libcolour.c @@ -1082,12 +1082,10 @@ static void get_transfer_function(libcolour_colour_t* cs) } -int libcolour_get_rgb_colour_space(libcolour_colour_t* cs_, libcolour_rgb_colour_space_t space) +int libcolour_rgb_colour_space(libcolour_rgb_t* cs, libcolour_rgb_colour_space_t space) { #define XYY(XVALUE, YVALUE) (libcolour_ciexyy_t){ .model = LIBCOLOUR_CIEXYY, .x = XVALUE, .y = YVALUE, .Y = 1} - libcolour_rgb_t* cs = &cs_->rgb; - switch (space) { case LIBCOLOUR_RGB_COLOUR_SPACE_CUSTOM_FROM_MEASUREMENTS: if (get_matrices(cs)) @@ -1375,9 +1373,9 @@ int libcolour_get_rgb_colour_space(libcolour_colour_t* cs_, libcolour_rgb_colour cs->transitioninv = cs->transition * cs->slope; cs->colour_space = space; cs->white_r = cs->white_g = cs->white_b = 1; - if (get_matrices(cs) || libcolour_proper(cs_)) + if (get_matrices(cs) || libcolour_proper((libcolour_colour_t*)cs)) return -1; - get_transfer_function(cs_); + get_transfer_function((libcolour_colour_t*)cs); return 0; #undef XYY diff --git a/src/libcolour.h b/src/libcolour.h index 3a8975e..b45b1a4 100644 --- a/src/libcolour.h +++ b/src/libcolour.h @@ -291,7 +291,7 @@ double libcolour_srgb_encode(double); double libcolour_srgb_decode(double); int libcolour_delta_e(const libcolour_colour_t*, const libcolour_colour_t*, double*); int libcolour_proper(libcolour_colour_t*); -int libcolour_get_rgb_colour_space(libcolour_colour_t*, libcolour_rgb_colour_space_t); +int libcolour_get_rgb_colour_space(libcolour_rgb_t*, libcolour_rgb_colour_space_t); size_t libcolour_marshal(const libcolour_colour_t*, void*); size_t libcolour_unmarshal(libcolour_colour_t*, const void*); |