LIBJXL

Loading...
Searching...
No Matches
gain_map.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
13#ifndef JXL_GAIN_MAP_H_
14#define JXL_GAIN_MAP_H_
15
16#include <jxl/color_encoding.h>
17#include <jxl/jxl_export.h>
18#include <jxl/types.h>
19
20#ifdef __cplusplus
21 extern "C" {
22#endif
23
38 typedef struct {
40 uint8_t jhgm_version;
42 uint16_t gain_map_metadata_size;
46 const uint8_t* gain_map_metadata;
48 JXL_BOOL has_color_encoding;
51 JxlColorEncoding color_encoding;
54 uint32_t alt_icc_size;
57 const uint8_t* alt_icc;
59 uint32_t gain_map_size;
62 const uint8_t* gain_map;
63} JxlGainMapBundle;
64
76JXL_EXPORT JXL_BOOL JxlGainMapGetBundleSize(const JxlGainMapBundle* map_bundle,
77 size_t* bundle_size);
78
94JXL_EXPORT JXL_BOOL JxlGainMapWriteBundle(const JxlGainMapBundle* map_bundle,
95 uint8_t* output_buffer,
96 size_t output_buffer_size,
97 size_t* bytes_written);
98
118JXL_EXPORT JXL_BOOL JxlGainMapReadBundle(JxlGainMapBundle* map_bundle,
119 const uint8_t* input_buffer,
120 size_t input_buffer_size,
121 size_t* bytes_read);
122
123#ifdef __cplusplus
124}
125#endif
126
127#endif /* JXL_GAIN_MAP_H_ */
128
color_encoding.h
Color Encoding definitions used by JPEG XL. All CIE units are for the standard 1931 2 degree observer...
JXL_BOOL
#define JXL_BOOL
Definition types.h:29
JxlGainMapGetBundleSize
JXL_EXPORT JXL_BOOL JxlGainMapGetBundleSize(const JxlGainMapBundle *map_bundle, size_t *bundle_size)
JxlGainMapWriteBundle
JXL_EXPORT JXL_BOOL JxlGainMapWriteBundle(const JxlGainMapBundle *map_bundle, uint8_t *output_buffer, size_t output_buffer_size, size_t *bytes_written)
JxlGainMapReadBundle
JXL_EXPORT JXL_BOOL JxlGainMapReadBundle(JxlGainMapBundle *map_bundle, const uint8_t *input_buffer, size_t input_buffer_size, size_t *bytes_read)
JxlColorEncoding
Definition color_encoding.h:114
JxlGainMapBundle
Definition gain_map.h:38
JxlGainMapBundle::has_color_encoding
JXL_BOOL has_color_encoding
Definition gain_map.h:48
JxlGainMapBundle::alt_icc
const uint8_t * alt_icc
Definition gain_map.h:57
JxlGainMapBundle::alt_icc_size
uint32_t alt_icc_size
Definition gain_map.h:54
JxlGainMapBundle::color_encoding
JxlColorEncoding color_encoding
Definition gain_map.h:51
JxlGainMapBundle::jhgm_version
uint8_t jhgm_version
Definition gain_map.h:40
JxlGainMapBundle::gain_map_metadata
const uint8_t * gain_map_metadata
Definition gain_map.h:46
JxlGainMapBundle::gain_map
const uint8_t * gain_map
Definition gain_map.h:62
JxlGainMapBundle::gain_map_metadata_size
uint16_t gain_map_metadata_size
Definition gain_map.h:42
JxlGainMapBundle::gain_map_size
uint32_t gain_map_size
Definition gain_map.h:59
types.h
Data types for the JPEG XL API, for both encoding and decoding.