color_encoding.h
Go to the documentation of this file.
/* Copyright (c) the JPEG XL Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
#ifndef JXL_COLOR_ENCODING_H_
#define JXL_COLOR_ENCODING_H_
#include <stdint.h>
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
typedef enum {
JXL_COLOR_SPACE_RGB,
JXL_COLOR_SPACE_GRAY,
JXL_COLOR_SPACE_XYB,
JXL_COLOR_SPACE_UNKNOWN,
} JxlColorSpace;
typedef enum {
JXL_WHITE_POINT_D65 = 1,
JXL_WHITE_POINT_CUSTOM = 2,
JXL_WHITE_POINT_E = 10,
JXL_WHITE_POINT_DCI = 11,
} JxlWhitePoint;
typedef enum {
JXL_PRIMARIES_SRGB = 1,
JXL_PRIMARIES_CUSTOM = 2,
JXL_PRIMARIES_2100 = 9,
JXL_PRIMARIES_P3 = 11,
} JxlPrimaries;
typedef enum {
JXL_TRANSFER_FUNCTION_709 = 1,
JXL_TRANSFER_FUNCTION_UNKNOWN = 2,
JXL_TRANSFER_FUNCTION_LINEAR = 8,
JXL_TRANSFER_FUNCTION_SRGB = 13,
JXL_TRANSFER_FUNCTION_PQ = 16,
JXL_TRANSFER_FUNCTION_DCI = 17,
JXL_TRANSFER_FUNCTION_HLG = 18,
JXL_TRANSFER_FUNCTION_GAMMA = 65535,
} JxlTransferFunction;
typedef enum {
JXL_RENDERING_INTENT_PERCEPTUAL = 0,
JXL_RENDERING_INTENT_RELATIVE,
JXL_RENDERING_INTENT_SATURATION,
JXL_RENDERING_INTENT_ABSOLUTE,
} JxlRenderingIntent;
typedef struct {
JxlColorSpace color_space;
JxlWhitePoint white_point;
double white_point_xy[2];
JxlPrimaries primaries;
double primaries_red_xy[2];
double primaries_green_xy[2];
double primaries_blue_xy[2];
JxlTransferFunction transfer_function;
double gamma;
JxlRenderingIntent rendering_intent;
} JxlColorEncoding;
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif /* JXL_COLOR_ENCODING_H_ */
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