LIBJXL: jxl/color_encoding.h Source File

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#include <stdint.h>
18
19#if defined(__cplusplus) || defined(c_plusplus)
20extern "C" {
21#endif
22
24 typedef enum {
26 JXL_COLOR_SPACE_RGB,
30 JXL_COLOR_SPACE_GRAY,
32 JXL_COLOR_SPACE_XYB,
34 JXL_COLOR_SPACE_UNKNOWN,
35} JxlColorSpace;
36
44 typedef enum {
46 JXL_WHITE_POINT_D65 = 1,
50 JXL_WHITE_POINT_CUSTOM = 2,
52 JXL_WHITE_POINT_E = 10,
54 JXL_WHITE_POINT_DCI = 11,
55} JxlWhitePoint;
56
65 typedef enum {
68 JXL_PRIMARIES_SRGB = 1,
72 JXL_PRIMARIES_CUSTOM = 2,
74 JXL_PRIMARIES_2100 = 9,
76 JXL_PRIMARIES_P3 = 11,
77} JxlPrimaries;
78
82 typedef enum {
84 JXL_TRANSFER_FUNCTION_709 = 1,
86 JXL_TRANSFER_FUNCTION_UNKNOWN = 2,
88 JXL_TRANSFER_FUNCTION_LINEAR = 8,
90 JXL_TRANSFER_FUNCTION_SRGB = 13,
92 JXL_TRANSFER_FUNCTION_PQ = 16,
94 JXL_TRANSFER_FUNCTION_DCI = 17,
96 JXL_TRANSFER_FUNCTION_HLG = 18,
99 JXL_TRANSFER_FUNCTION_GAMMA = 65535,
100} JxlTransferFunction;
101
103 typedef enum {
105 JXL_RENDERING_INTENT_PERCEPTUAL = 0,
107 JXL_RENDERING_INTENT_RELATIVE,
109 JXL_RENDERING_INTENT_SATURATION,
111 JXL_RENDERING_INTENT_ABSOLUTE,
112} JxlRenderingIntent;
113
116 typedef struct {
119 JxlColorSpace color_space;
120
124 JxlWhitePoint white_point;
125
127 double white_point_xy[2];
128
134 JxlPrimaries primaries;
135
137 double primaries_red_xy[2];
138
140 double primaries_green_xy[2];
141
143 double primaries_blue_xy[2];
144
146 JxlTransferFunction transfer_function;
147
150 double gamma;
151
153 JxlRenderingIntent rendering_intent;
154} JxlColorEncoding;
155
156#if defined(__cplusplus) || defined(c_plusplus)
157}
158#endif
159
160#endif /* JXL_COLOR_ENCODING_H_ */
161
JxlColorSpace
JxlColorSpace
Definition color_encoding.h:24
JxlPrimaries
JxlPrimaries
Definition color_encoding.h:65
JxlTransferFunction
JxlTransferFunction
Definition color_encoding.h:82
JxlWhitePoint
JxlWhitePoint
Definition color_encoding.h:44
JxlRenderingIntent
JxlRenderingIntent
Definition color_encoding.h:103
JXL_COLOR_SPACE_UNKNOWN
@ JXL_COLOR_SPACE_UNKNOWN
Definition color_encoding.h:34
JXL_COLOR_SPACE_GRAY
@ JXL_COLOR_SPACE_GRAY
Definition color_encoding.h:30
JXL_COLOR_SPACE_XYB
@ JXL_COLOR_SPACE_XYB
Definition color_encoding.h:32
JXL_COLOR_SPACE_RGB
@ JXL_COLOR_SPACE_RGB
Definition color_encoding.h:26
JXL_PRIMARIES_SRGB
@ JXL_PRIMARIES_SRGB
Definition color_encoding.h:68
JXL_PRIMARIES_P3
@ JXL_PRIMARIES_P3
Definition color_encoding.h:76
JXL_PRIMARIES_CUSTOM
@ JXL_PRIMARIES_CUSTOM
Definition color_encoding.h:72
JXL_PRIMARIES_2100
@ JXL_PRIMARIES_2100
Definition color_encoding.h:74
JXL_TRANSFER_FUNCTION_UNKNOWN
@ JXL_TRANSFER_FUNCTION_UNKNOWN
Definition color_encoding.h:86
JXL_TRANSFER_FUNCTION_PQ
@ JXL_TRANSFER_FUNCTION_PQ
Definition color_encoding.h:92
JXL_TRANSFER_FUNCTION_SRGB
@ JXL_TRANSFER_FUNCTION_SRGB
Definition color_encoding.h:90
JXL_TRANSFER_FUNCTION_HLG
@ JXL_TRANSFER_FUNCTION_HLG
Definition color_encoding.h:96
JXL_TRANSFER_FUNCTION_GAMMA
@ JXL_TRANSFER_FUNCTION_GAMMA
Definition color_encoding.h:99
JXL_TRANSFER_FUNCTION_DCI
@ JXL_TRANSFER_FUNCTION_DCI
Definition color_encoding.h:94
JXL_TRANSFER_FUNCTION_LINEAR
@ JXL_TRANSFER_FUNCTION_LINEAR
Definition color_encoding.h:88
JXL_TRANSFER_FUNCTION_709
@ JXL_TRANSFER_FUNCTION_709
Definition color_encoding.h:84
JXL_WHITE_POINT_E
@ JXL_WHITE_POINT_E
Definition color_encoding.h:52
JXL_WHITE_POINT_D65
@ JXL_WHITE_POINT_D65
Definition color_encoding.h:46
JXL_WHITE_POINT_CUSTOM
@ JXL_WHITE_POINT_CUSTOM
Definition color_encoding.h:50
JXL_WHITE_POINT_DCI
@ JXL_WHITE_POINT_DCI
Definition color_encoding.h:54
JXL_RENDERING_INTENT_SATURATION
@ JXL_RENDERING_INTENT_SATURATION
Definition color_encoding.h:109
JXL_RENDERING_INTENT_PERCEPTUAL
@ JXL_RENDERING_INTENT_PERCEPTUAL
Definition color_encoding.h:105
JXL_RENDERING_INTENT_ABSOLUTE
@ JXL_RENDERING_INTENT_ABSOLUTE
Definition color_encoding.h:111
JXL_RENDERING_INTENT_RELATIVE
@ JXL_RENDERING_INTENT_RELATIVE
Definition color_encoding.h:107
JxlColorEncoding
Definition color_encoding.h:116
JxlColorEncoding::transfer_function
JxlTransferFunction transfer_function
Definition color_encoding.h:146
JxlColorEncoding::primaries
JxlPrimaries primaries
Definition color_encoding.h:134
JxlColorEncoding::white_point
JxlWhitePoint white_point
Definition color_encoding.h:124
JxlColorEncoding::rendering_intent
JxlRenderingIntent rendering_intent
Definition color_encoding.h:153
JxlColorEncoding::gamma
double gamma
Definition color_encoding.h:150
JxlColorEncoding::color_space
JxlColorSpace color_space
Definition color_encoding.h:119