LIBJXL

Classes | Macros | Enumerations
types.h File Reference

Data types for the JPEG XL API, for both encoding and decoding. More...

`#include <stddef.h>`
`#include <stdint.h>`
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | JxlPixelFormat

## Macros
#define | JXL_BOOL int
#define | JXL_TRUE 1
#define | JXL_FALSE 0

## Enumerations
enum | JxlDataType { JXL_TYPE_FLOAT = 0 , JXL_TYPE_BOOLEAN , JXL_TYPE_UINT8 , JXL_TYPE_UINT16 , JXL_TYPE_UINT32 , JXL_TYPE_FLOAT16 }
enum | JxlEndianness { JXL_NATIVE_ENDIAN = 0 , JXL_LITTLE_ENDIAN = 1 , JXL_BIG_ENDIAN = 2 }

## Detailed Description

Data types for the JPEG XL API, for both encoding and decoding.

## Macro Definition Documentation

## ◆ JXL_BOOL

#define JXL_BOOL int

A portable `bool` replacement.

JXL_BOOL is a "documentation" type: actually it is `int`, but in API it denotes a type, whose only values are JXL_TRUE and JXL_FALSE.

## ◆ JXL_FALSE

#define JXL_FALSE 0

Portable `false` replacement.

## ◆ JXL_TRUE

#define JXL_TRUE 1

Portable `true` replacement.

## Enumeration Type Documentation

## ◆ JxlDataType

enum JxlDataType

Data type for the sample values per channel per pixel.

Enumerator
JXL_TYPE_FLOAT | Use 32-bit single-precision floating point values, with range 0.0-1.0 (within gamut, may go outside this range for wide color gamut). Floating point output, either JXL_TYPE_FLOAT or JXL_TYPE_FLOAT16, is recommended for HDR and wide gamut images when color profile conversion is required.
JXL_TYPE_BOOLEAN | Use 1-bit packed in uint8_t, first pixel in LSB, padded to uint8_t per row. TODO(lode): support first in MSB, other padding.
JXL_TYPE_UINT8 | Use type uint8_t. May clip wide color gamut data.
JXL_TYPE_UINT16 | Use type uint16_t. May clip wide color gamut data.
JXL_TYPE_UINT32 | Use type uint32_t. May clip wide color gamut data.
JXL_TYPE_FLOAT16 | Use 16-bit IEEE 754 half-precision floating point values

## ◆ JxlEndianness

enum JxlEndianness

Ordering of multi-byte data.

Enumerator
JXL_NATIVE_ENDIAN | Use the endianness of the system, either little endian or big endian, without forcing either specific endianness. Do not use if pixel data should be exported to a well defined format.
JXL_LITTLE_ENDIAN | Force little endian
JXL_BIG_ENDIAN | Force big endian