LIBJXL

Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
encode.h File Reference
JPEG XL library (libjxl) » JPEG XL Encoder API

Encoding API for JPEG XL. More...

`#include <jxl/cms_interface.h>`
`#include <jxl/codestream_header.h>`
`#include <jxl/color_encoding.h>`
`#include <jxl/jxl_export.h>`
`#include <jxl/memory_manager.h>`
`#include <jxl/parallel_runner.h>`
`#include <jxl/stats.h>`
`#include <jxl/types.h>`
`#include <jxl/version.h>`
`#include <stddef.h>`
`#include <stdint.h>`
Include dependency graph for encode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | JxlEncoderOutputProcessor
struct | JxlChunkedFrameInputSource

## Typedefs
typedef struct JxlEncoderStruct | JxlEncoder
typedef struct JxlEncoderFrameSettingsStruct | JxlEncoderFrameSettings
typedef void(* | JxlDebugImageCallback) (void *opaque, const char *label, size_t xsize, size_t ysize, const JxlColorEncoding *color, const uint16_t *pixels)

## Enumerations
enum | JxlEncoderStatus { JXL_ENC_SUCCESS = 0 , JXL_ENC_ERROR = 1 , JXL_ENC_NEED_MORE_OUTPUT = 2 }
enum | JxlEncoderError { JXL_ENC_ERR_OK = 0 , JXL_ENC_ERR_GENERIC = 1 , JXL_ENC_ERR_OOM = 2 , JXL_ENC_ERR_JBRD = 3 , JXL_ENC_ERR_BAD_INPUT = 4 , JXL_ENC_ERR_NOT_SUPPORTED = 0x80 , JXL_ENC_ERR_API_USAGE = 0x81 }
enum | JxlEncoderFrameSettingId { JXL_ENC_FRAME_SETTING_EFFORT = 0 , JXL_ENC_FRAME_SETTING_DECODING_SPEED = 1 , JXL_ENC_FRAME_SETTING_RESAMPLING = 2 , JXL_ENC_FRAME_SETTING_EXTRA_CHANNEL_RESAMPLING = 3 , JXL_ENC_FRAME_SETTING_ALREADY_DOWNSAMPLED = 4 , JXL_ENC_FRAME_SETTING_PHOTON_NOISE = 5 , JXL_ENC_FRAME_SETTING_NOISE = 6 , JXL_ENC_FRAME_SETTING_DOTS = 7 , JXL_ENC_FRAME_SETTING_PATCHES = 8 , JXL_ENC_FRAME_SETTING_EPF = 9 , JXL_ENC_FRAME_SETTING_GABORISH = 10 , JXL_ENC_FRAME_SETTING_MODULAR = 11 , JXL_ENC_FRAME_SETTING_KEEP_INVISIBLE = 12 , JXL_ENC_FRAME_SETTING_GROUP_ORDER = 13 , JXL_ENC_FRAME_SETTING_GROUP_ORDER_CENTER_X = 14 , JXL_ENC_FRAME_SETTING_GROUP_ORDER_CENTER_Y = 15 , JXL_ENC_FRAME_SETTING_RESPONSIVE = 16 , JXL_ENC_FRAME_SETTING_PROGRESSIVE_AC = 17 , JXL_ENC_FRAME_SETTING_QPROGRESSIVE_AC = 18 , JXL_ENC_FRAME_SETTING_PROGRESSIVE_DC = 19 , JXL_ENC_FRAME_SETTING_CHANNEL_COLORS_GLOBAL_PERCENT = 20 , JXL_ENC_FRAME_SETTING_CHANNEL_COLORS_GROUP_PERCENT = 21 , JXL_ENC_FRAME_SETTING_PALETTE_COLORS = 22 , JXL_ENC_FRAME_SETTING_LOSSY_PALETTE = 23 , JXL_ENC_FRAME_SETTING_COLOR_TRANSFORM = 24 , JXL_ENC_FRAME_SETTING_MODULAR_COLOR_SPACE = 25 , JXL_ENC_FRAME_SETTING_MODULAR_GROUP_SIZE = 26 , JXL_ENC_FRAME_SETTING_MODULAR_PREDICTOR = 27 , JXL_ENC_FRAME_SETTING_MODULAR_MA_TREE_LEARNING_PERCENT = 28 , JXL_ENC_FRAME_SETTING_MODULAR_NB_PREV_CHANNELS = 29 , JXL_ENC_FRAME_SETTING_JPEG_RECON_CFL = 30 , JXL_ENC_FRAME_INDEX_BOX = 31 , JXL_ENC_FRAME_SETTING_BROTLI_EFFORT = 32 , JXL_ENC_FRAME_SETTING_JPEG_COMPRESS_BOXES = 33 , JXL_ENC_FRAME_SETTING_BUFFERING = 34 , JXL_ENC_FRAME_SETTING_JPEG_KEEP_EXIF = 35 , JXL_ENC_FRAME_SETTING_JPEG_KEEP_XMP = 36 , JXL_ENC_FRAME_SETTING_JPEG_KEEP_JUMBF = 37 , JXL_ENC_FRAME_SETTING_USE_FULL_IMAGE_HEURISTICS = 38 , JXL_ENC_FRAME_SETTING_DISABLE_PERCEPTUAL_HEURISTICS = 39 , JXL_ENC_FRAME_SETTING_FILL_ENUM = 65535 }

## Functions
JXL_EXPORT uint32_t | JxlEncoderVersion (void)
JXL_EXPORT JxlEncoder * | JxlEncoderCreate (const JxlMemoryManager *memory_manager)
JXL_EXPORT void | JxlEncoderReset (JxlEncoder *enc)
JXL_EXPORT void | JxlEncoderDestroy (JxlEncoder *enc)
JXL_EXPORT void | JxlEncoderSetCms (JxlEncoder *enc, JxlCmsInterface cms)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetParallelRunner (JxlEncoder *enc, JxlParallelRunner parallel_runner, void *parallel_runner_opaque)
JXL_EXPORT JxlEncoderError | JxlEncoderGetError (JxlEncoder *enc)
JXL_EXPORT JxlEncoderStatus | JxlEncoderProcessOutput (JxlEncoder *enc, uint8_t **next_out, size_t *avail_out)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetFrameHeader (JxlEncoderFrameSettings *frame_settings, const JxlFrameHeader *frame_header)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetExtraChannelBlendInfo (JxlEncoderFrameSettings *frame_settings, size_t index, const JxlBlendInfo *blend_info)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetFrameName (JxlEncoderFrameSettings *frame_settings, const char *frame_name)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetFrameBitDepth (JxlEncoderFrameSettings *frame_settings, const JxlBitDepth *bit_depth)
JXL_EXPORT JxlEncoderStatus | JxlEncoderAddJPEGFrame (const JxlEncoderFrameSettings *frame_settings, const uint8_t *buffer, size_t size)
JXL_EXPORT JxlEncoderStatus | JxlEncoderAddImageFrame (const JxlEncoderFrameSettings *frame_settings, const JxlPixelFormat *pixel_format, const void *buffer, size_t size)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetOutputProcessor (JxlEncoder *enc, struct JxlEncoderOutputProcessor output_processor)
JXL_EXPORT JxlEncoderStatus | JxlEncoderFlushInput (JxlEncoder *enc)
JXL_EXPORT JxlEncoderStatus | JxlEncoderAddChunkedFrame (const JxlEncoderFrameSettings *frame_settings, JXL_BOOL is_last_frame, struct JxlChunkedFrameInputSource chunked_frame_input)
| Adds a frame to the encoder using a chunked input source.
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetExtraChannelBuffer (const JxlEncoderFrameSettings *frame_settings, const JxlPixelFormat *pixel_format, const void *buffer, size_t size, uint32_t index)
JXL_EXPORT JxlEncoderStatus | JxlEncoderAddBox (JxlEncoder *enc, const JxlBoxType type, const uint8_t *contents, size_t size, JXL_BOOL compress_box)
JXL_EXPORT JxlEncoderStatus | JxlEncoderUseBoxes (JxlEncoder *enc)
JXL_EXPORT void | JxlEncoderCloseBoxes (JxlEncoder *enc)
JXL_EXPORT void | JxlEncoderCloseFrames (JxlEncoder *enc)
JXL_EXPORT void | JxlEncoderCloseInput (JxlEncoder *enc)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetColorEncoding (JxlEncoder *enc, const JxlColorEncoding *color)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetICCProfile (JxlEncoder *enc, const uint8_t *icc_profile, size_t size)
JXL_EXPORT void | JxlEncoderInitBasicInfo (JxlBasicInfo *info)
JXL_EXPORT void | JxlEncoderInitFrameHeader (JxlFrameHeader *frame_header)
JXL_EXPORT void | JxlEncoderInitBlendInfo (JxlBlendInfo *blend_info)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetBasicInfo (JxlEncoder *enc, const JxlBasicInfo *info)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetUpsamplingMode (JxlEncoder *enc, int64_t factor, int64_t mode)
JXL_EXPORT void | JxlEncoderInitExtraChannelInfo (JxlExtraChannelType type, JxlExtraChannelInfo *info)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetExtraChannelInfo (JxlEncoder *enc, size_t index, const JxlExtraChannelInfo *info)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetExtraChannelName (JxlEncoder *enc, size_t index, const char *name, size_t size)
JXL_EXPORT JxlEncoderStatus | JxlEncoderFrameSettingsSetOption (JxlEncoderFrameSettings *frame_settings, JxlEncoderFrameSettingId option, int64_t value)
JXL_EXPORT JxlEncoderStatus | JxlEncoderFrameSettingsSetFloatOption (JxlEncoderFrameSettings *frame_settings, JxlEncoderFrameSettingId option, float value)
JXL_EXPORT JxlEncoderStatus | JxlEncoderUseContainer (JxlEncoder *enc, JXL_BOOL use_container)
JXL_EXPORT JxlEncoderStatus | JxlEncoderStoreJPEGMetadata (JxlEncoder *enc, JXL_BOOL store_jpeg_metadata)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetCodestreamLevel (JxlEncoder *enc, int level)
JXL_EXPORT int | JxlEncoderGetRequiredCodestreamLevel (const JxlEncoder *enc)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetFrameLossless (JxlEncoderFrameSettings *frame_settings, JXL_BOOL lossless)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetFrameDistance (JxlEncoderFrameSettings *frame_settings, float distance)
JXL_EXPORT JxlEncoderStatus | JxlEncoderSetExtraChannelDistance (JxlEncoderFrameSettings *frame_settings, size_t index, float distance)
JXL_EXPORT float | JxlEncoderDistanceFromQuality (float quality)
JXL_EXPORT JxlEncoderFrameSettings * | JxlEncoderFrameSettingsCreate (JxlEncoder *enc, const JxlEncoderFrameSettings *source)
JXL_EXPORT void | JxlColorEncodingSetToSRGB (JxlColorEncoding *color_encoding, JXL_BOOL is_gray)
JXL_EXPORT void | JxlColorEncodingSetToLinearSRGB (JxlColorEncoding *color_encoding, JXL_BOOL is_gray)
JXL_EXPORT void | JxlEncoderAllowExpertOptions (JxlEncoder *enc)
JXL_EXPORT void | JxlEncoderSetDebugImageCallback (JxlEncoderFrameSettings *frame_settings, JxlDebugImageCallback callback, void *opaque)
JXL_EXPORT void | JxlEncoderCollectStats (JxlEncoderFrameSettings *frame_settings, JxlEncoderStats *stats)

## Detailed Description

Encoding API for JPEG XL.