LIBJXL

Loading...
Searching...
No Matches
color_encoding.h
Go to the documentation of this file.
1/* Copyright (c) the JPEG XL Project Authors. All rights reserved.
2 *
3 * Use of this source code is governed by a BSD-style
4 * license that can be found in the LICENSE file.
5 */
6
14#ifndef JXL_COLOR_ENCODING_H_
15#define JXL_COLOR_ENCODING_H_
16
17#ifdef __cplusplus
18 extern "C" {
19#endif
20
22 typedef enum {
24 JXL_COLOR_SPACE_RGB,
28 JXL_COLOR_SPACE_GRAY,
30 JXL_COLOR_SPACE_XYB,
32 JXL_COLOR_SPACE_UNKNOWN,
33} JxlColorSpace;
34
42 typedef enum {
44 JXL_WHITE_POINT_D65 = 1,
48 JXL_WHITE_POINT_CUSTOM = 2,
50 JXL_WHITE_POINT_E = 10,
52 JXL_WHITE_POINT_DCI = 11,
53} JxlWhitePoint;
54
63 typedef enum {
66 JXL_PRIMARIES_SRGB = 1,
70 JXL_PRIMARIES_CUSTOM = 2,
72 JXL_PRIMARIES_2100 = 9,
74 JXL_PRIMARIES_P3 = 11,
75} JxlPrimaries;
76
80 typedef enum {
82 JXL_TRANSFER_FUNCTION_709 = 1,
84 JXL_TRANSFER_FUNCTION_UNKNOWN = 2,
86 JXL_TRANSFER_FUNCTION_LINEAR = 8,
88 JXL_TRANSFER_FUNCTION_SRGB = 13,
90 JXL_TRANSFER_FUNCTION_PQ = 16,
92 JXL_TRANSFER_FUNCTION_DCI = 17,
94 JXL_TRANSFER_FUNCTION_HLG = 18,
97 JXL_TRANSFER_FUNCTION_GAMMA = 65535,
98} JxlTransferFunction;
99
101 typedef enum {
103 JXL_RENDERING_INTENT_PERCEPTUAL = 0,
105 JXL_RENDERING_INTENT_RELATIVE,
107 JXL_RENDERING_INTENT_SATURATION,
109 JXL_RENDERING_INTENT_ABSOLUTE,
110} JxlRenderingIntent;
111
114 typedef struct {
117 JxlColorSpace color_space;
118
122 JxlWhitePoint white_point;
123
125 double white_point_xy[2];
126
132 JxlPrimaries primaries;
133
135 double primaries_red_xy[2];
136
138 double primaries_green_xy[2];
139
141 double primaries_blue_xy[2];
142
144 JxlTransferFunction transfer_function;
145
149 double gamma;
150
152 JxlRenderingIntent rendering_intent;
153} JxlColorEncoding;
154
155#ifdef __cplusplus
156}
157#endif
158
159#endif /* JXL_COLOR_ENCODING_H_ */
160
JxlColorSpace
JxlColorSpace
Definition color_encoding.h:22
JxlPrimaries
JxlPrimaries
Definition color_encoding.h:63
JxlTransferFunction
JxlTransferFunction
Definition color_encoding.h:80
JxlWhitePoint
JxlWhitePoint
Definition color_encoding.h:42
JxlRenderingIntent
JxlRenderingIntent
Definition color_encoding.h:101
JXL_COLOR_SPACE_UNKNOWN
@ JXL_COLOR_SPACE_UNKNOWN
Definition color_encoding.h:32
JXL_COLOR_SPACE_GRAY
@ JXL_COLOR_SPACE_GRAY
Definition color_encoding.h:28
JXL_COLOR_SPACE_XYB
@ JXL_COLOR_SPACE_XYB
Definition color_encoding.h:30
JXL_COLOR_SPACE_RGB
@ JXL_COLOR_SPACE_RGB
Definition color_encoding.h:24
JXL_PRIMARIES_SRGB
@ JXL_PRIMARIES_SRGB
Definition color_encoding.h:66
JXL_PRIMARIES_P3
@ JXL_PRIMARIES_P3
Definition color_encoding.h:74
JXL_PRIMARIES_CUSTOM
@ JXL_PRIMARIES_CUSTOM
Definition color_encoding.h:70
JXL_PRIMARIES_2100
@ JXL_PRIMARIES_2100
Definition color_encoding.h:72
JXL_TRANSFER_FUNCTION_UNKNOWN
@ JXL_TRANSFER_FUNCTION_UNKNOWN
Definition color_encoding.h:84
JXL_TRANSFER_FUNCTION_PQ
@ JXL_TRANSFER_FUNCTION_PQ
Definition color_encoding.h:90
JXL_TRANSFER_FUNCTION_SRGB
@ JXL_TRANSFER_FUNCTION_SRGB
Definition color_encoding.h:88
JXL_TRANSFER_FUNCTION_HLG
@ JXL_TRANSFER_FUNCTION_HLG
Definition color_encoding.h:94
JXL_TRANSFER_FUNCTION_GAMMA
@ JXL_TRANSFER_FUNCTION_GAMMA
Definition color_encoding.h:97
JXL_TRANSFER_FUNCTION_DCI
@ JXL_TRANSFER_FUNCTION_DCI
Definition color_encoding.h:92
JXL_TRANSFER_FUNCTION_LINEAR
@ JXL_TRANSFER_FUNCTION_LINEAR
Definition color_encoding.h:86
JXL_TRANSFER_FUNCTION_709
@ JXL_TRANSFER_FUNCTION_709
Definition color_encoding.h:82
JXL_WHITE_POINT_E
@ JXL_WHITE_POINT_E
Definition color_encoding.h:50
JXL_WHITE_POINT_D65
@ JXL_WHITE_POINT_D65
Definition color_encoding.h:44
JXL_WHITE_POINT_CUSTOM
@ JXL_WHITE_POINT_CUSTOM
Definition color_encoding.h:48
JXL_WHITE_POINT_DCI
@ JXL_WHITE_POINT_DCI
Definition color_encoding.h:52
JXL_RENDERING_INTENT_SATURATION
@ JXL_RENDERING_INTENT_SATURATION
Definition color_encoding.h:107
JXL_RENDERING_INTENT_PERCEPTUAL
@ JXL_RENDERING_INTENT_PERCEPTUAL
Definition color_encoding.h:103
JXL_RENDERING_INTENT_ABSOLUTE
@ JXL_RENDERING_INTENT_ABSOLUTE
Definition color_encoding.h:109
JXL_RENDERING_INTENT_RELATIVE
@ JXL_RENDERING_INTENT_RELATIVE
Definition color_encoding.h:105
JxlColorEncoding
Definition color_encoding.h:114
JxlColorEncoding::transfer_function
JxlTransferFunction transfer_function
Definition color_encoding.h:144
JxlColorEncoding::primaries
JxlPrimaries primaries
Definition color_encoding.h:132
JxlColorEncoding::white_point
JxlWhitePoint white_point
Definition color_encoding.h:122
JxlColorEncoding::rendering_intent
JxlRenderingIntent rendering_intent
Definition color_encoding.h:152
JxlColorEncoding::gamma
double gamma
Definition color_encoding.h:149
JxlColorEncoding::color_space
JxlColorSpace color_space
Definition color_encoding.h:117