2 * Copyright (C) 2008 David Schleef <ds@entropywave.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
27 typedef struct _Color Color;
28 typedef struct _ColorMatrix ColorMatrix;
40 void color_xyY_to_XYZ (Color * c);
41 void color_XYZ_to_xyY (Color * c);
42 void color_set (Color * c, double x, double y, double z);
43 void color_matrix_set_identity (ColorMatrix * m);
44 void color_matrix_dump (ColorMatrix * m);
45 void color_matrix_multiply (ColorMatrix * dst, ColorMatrix * a, ColorMatrix * b);
46 void color_matrix_apply (ColorMatrix * m, Color * dest, Color * src);
47 void color_matrix_offset_components (ColorMatrix * m, double a1, double a2,
49 void color_matrix_scale_components (ColorMatrix * m, double a1, double a2, double a3);
50 void color_matrix_YCbCr_to_RGB (ColorMatrix * m, double Kr, double Kb);
51 void color_matrix_RGB_to_YCbCr (ColorMatrix * m, double Kr, double Kb);
52 void color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst);
53 void color_matrix_build_bt709_to_bt601 (ColorMatrix * dst);
54 void color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst);
55 void color_matrix_invert (ColorMatrix * m);
56 void color_matrix_copy (ColorMatrix * dest, ColorMatrix * src);
57 void color_matrix_transpose (ColorMatrix * m);
58 void color_matrix_build_XYZ (ColorMatrix * dst,
60 double gx, double gy, double bx, double by, double wx, double wy);
61 void color_matrix_build_rgb_to_XYZ_601 (ColorMatrix * dst);
62 void color_matrix_build_XYZ_to_rgb_709 (ColorMatrix * dst);
63 void color_matrix_build_XYZ_to_rgb_dell (ColorMatrix * dst);
64 void color_transfer_function_apply (Color * dest, Color * src);
65 void color_transfer_function_unapply (Color * dest, Color * src);
66 void color_gamut_clamp (Color * dest, Color * src);