LIBJXL: /build/libjxl/src/libjxl/lib/include/jxl/color_encoding.h Source File

LIBJXL

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
12#ifndef JXL_COLOR_ENCODING_H_
13#define JXL_COLOR_ENCODING_H_
14
15#include <stdint.h>
16
17#include "jxl/types.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
39 typedef enum {
41 JXL_WHITE_POINT_D65 = 1,
43 JXL_WHITE_POINT_CUSTOM = 2,
45 JXL_WHITE_POINT_E = 10,
47 JXL_WHITE_POINT_DCI = 11,
48} JxlWhitePoint;
49
52 typedef enum {
55 JXL_PRIMARIES_SRGB = 1,
58 JXL_PRIMARIES_CUSTOM = 2,
60 JXL_PRIMARIES_2100 = 9,
62 JXL_PRIMARIES_P3 = 11,
63} JxlPrimaries;
64
67 typedef enum {
69 JXL_TRANSFER_FUNCTION_709 = 1,
71 JXL_TRANSFER_FUNCTION_UNKNOWN = 2,
73 JXL_TRANSFER_FUNCTION_LINEAR = 8,
75 JXL_TRANSFER_FUNCTION_SRGB = 13,
77 JXL_TRANSFER_FUNCTION_PQ = 16,
79 JXL_TRANSFER_FUNCTION_DCI = 17,
81 JXL_TRANSFER_FUNCTION_HLG = 18,
84 JXL_TRANSFER_FUNCTION_GAMMA = 65535,
85} JxlTransferFunction;
86
88 typedef enum {
90 JXL_RENDERING_INTENT_PERCEPTUAL = 0,
92 JXL_RENDERING_INTENT_RELATIVE,
94 JXL_RENDERING_INTENT_SATURATION,
96 JXL_RENDERING_INTENT_ABSOLUTE,
97} JxlRenderingIntent;
98
101 typedef struct {
104 JxlColorSpace color_space;
105
109 JxlWhitePoint white_point;
110
112 double white_point_xy[2];
113
119 JxlPrimaries primaries;
120
122 double primaries_red_xy[2];
123
125 double primaries_green_xy[2];
126
128 double primaries_blue_xy[2];
129
131 JxlTransferFunction transfer_function;
132
135 double gamma;
136
138 JxlRenderingIntent rendering_intent;
139} JxlColorEncoding;
140
141#if defined(__cplusplus) || defined(c_plusplus)
142}
143#endif
144
145#endif /* JXL_COLOR_ENCODING_H_ */
JxlColorSpace
JxlColorSpace
Definition: color_encoding.h:24
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
JxlPrimaries
JxlPrimaries
Definition: color_encoding.h:52
JXL_PRIMARIES_SRGB
@ JXL_PRIMARIES_SRGB
Definition: color_encoding.h:55
JXL_PRIMARIES_P3
@ JXL_PRIMARIES_P3
Definition: color_encoding.h:62
JXL_PRIMARIES_CUSTOM
@ JXL_PRIMARIES_CUSTOM
Definition: color_encoding.h:58
JXL_PRIMARIES_2100
@ JXL_PRIMARIES_2100
Definition: color_encoding.h:60
JxlTransferFunction
JxlTransferFunction
Definition: color_encoding.h:67
JXL_TRANSFER_FUNCTION_UNKNOWN
@ JXL_TRANSFER_FUNCTION_UNKNOWN
Definition: color_encoding.h:71
JXL_TRANSFER_FUNCTION_PQ
@ JXL_TRANSFER_FUNCTION_PQ
Definition: color_encoding.h:77
JXL_TRANSFER_FUNCTION_SRGB
@ JXL_TRANSFER_FUNCTION_SRGB
Definition: color_encoding.h:75
JXL_TRANSFER_FUNCTION_HLG
@ JXL_TRANSFER_FUNCTION_HLG
Definition: color_encoding.h:81
JXL_TRANSFER_FUNCTION_GAMMA
@ JXL_TRANSFER_FUNCTION_GAMMA
Definition: color_encoding.h:84
JXL_TRANSFER_FUNCTION_DCI
@ JXL_TRANSFER_FUNCTION_DCI
Definition: color_encoding.h:79
JXL_TRANSFER_FUNCTION_LINEAR
@ JXL_TRANSFER_FUNCTION_LINEAR
Definition: color_encoding.h:73
JXL_TRANSFER_FUNCTION_709
@ JXL_TRANSFER_FUNCTION_709
Definition: color_encoding.h:69
JxlWhitePoint
JxlWhitePoint
Definition: color_encoding.h:39
JXL_WHITE_POINT_E
@ JXL_WHITE_POINT_E
Definition: color_encoding.h:45
JXL_WHITE_POINT_D65
@ JXL_WHITE_POINT_D65
Definition: color_encoding.h:41
JXL_WHITE_POINT_CUSTOM
@ JXL_WHITE_POINT_CUSTOM
Definition: color_encoding.h:43
JXL_WHITE_POINT_DCI
@ JXL_WHITE_POINT_DCI
Definition: color_encoding.h:47
JxlRenderingIntent
JxlRenderingIntent
Definition: color_encoding.h:88
JXL_RENDERING_INTENT_SATURATION
@ JXL_RENDERING_INTENT_SATURATION
Definition: color_encoding.h:94
JXL_RENDERING_INTENT_PERCEPTUAL
@ JXL_RENDERING_INTENT_PERCEPTUAL
Definition: color_encoding.h:90
JXL_RENDERING_INTENT_ABSOLUTE
@ JXL_RENDERING_INTENT_ABSOLUTE
Definition: color_encoding.h:96
JXL_RENDERING_INTENT_RELATIVE
@ JXL_RENDERING_INTENT_RELATIVE
Definition: color_encoding.h:92
JxlColorEncoding
Definition: color_encoding.h:101
JxlColorEncoding::transfer_function
JxlTransferFunction transfer_function
Definition: color_encoding.h:131
JxlColorEncoding::primaries
JxlPrimaries primaries
Definition: color_encoding.h:119
JxlColorEncoding::white_point
JxlWhitePoint white_point
Definition: color_encoding.h:109
JxlColorEncoding::rendering_intent
JxlRenderingIntent rendering_intent
Definition: color_encoding.h:138
JxlColorEncoding::gamma
double gamma
Definition: color_encoding.h:135
JxlColorEncoding::color_space
JxlColorSpace color_space
Definition: color_encoding.h:104
types.h
Data types for the JPEG XL API, for both encoding and decoding.