[−][src]Crate jpegxl_sys
Structs
JpegxlAnimationHeader | The codestream animation header |
JpegxlBasicInfo | Basic image information. This information is available from the file signature and first part of the codestream header. |
JpegxlColorEncoding | Color encoding of the image as structured information. |
JpegxlColorProfileSource | Specifies how the color profile information of the image can be retrieved, Either through ICC profile, or through JpegxlColorEncoding. |
JpegxlDecoderStruct | |
JpegxlExtraChannelInfo | Information for a single extra channel. |
JpegxlHeaderExtensions | Extensions in the codestream header. |
JpegxlInverseOpsinMatrix | Color transform used for the XYB encoding. This affects how the internal XYB color format is converted, and is not needed unless XYB color is used. |
JpegxlMemoryManagerStruct | Memory Manager struct. These functions, when provided by the caller, will be used to handle memory allocations. |
JpegxlPixelFormat | Data type for the sample values per channel per pixel for the output buffer for pixels. This is not necessarily the same as the data type encoded in the codestream. The channels are interleaved per pixel. The pixels are organized row by row, left to right, top to bottom. TODO(lode): support padding / alignment (row stride) TODO(lode): support outputting >8-bit data into uint8_t (and endianness) TODO(lode): support non-interleaved (may be a no-op here, involves getting single channels separately instead) TODO(lode): support different channel orders if needed (RGB, BGR, ...) |
JpegxlPreviewHeader | The codestream preview header |
Constants
JPEGXL_FALSE | |
JPEGXL_PARALLEL_RET_RUNNER_ERROR | |
JPEGXL_TRUE | |
JpegxlBlendMode_JPEGXL_BLEND_MODE_ADD | The new values (in the crop) get added to the old ones |
JpegxlBlendMode_JPEGXL_BLEND_MODE_BLEND | The new values (in the crop) replace the old ones if alpha>0. Not allowed for the first alpha channel. |
JpegxlBlendMode_JPEGXL_BLEND_MODE_REPLACE | The new values (in the crop) replace the old ones |
JpegxlColorSpace_JPEGXL_COLOR_SPACE_GRAY | Luminance based, the primaries in JpegxlColorEncoding must be ignored. |
JpegxlColorSpace_JPEGXL_COLOR_SPACE_RGB | Tristimulus RGB |
JpegxlColorSpace_JPEGXL_COLOR_SPACE_UNKNOWN | None of the other table entries describe the colour space appropriately |
JpegxlColorSpace_JPEGXL_COLOR_SPACE_XYB | XYB (opsin) color space |
JpegxlDataType_JPEGXL_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. |
JpegxlDataType_JPEGXL_TYPE_FLOAT | use type float. |
JpegxlDataType_JPEGXL_TYPE_UINT8 | Use type uint8_t. |
JpegxlDataType_JPEGXL_TYPE_UINT16 | Use type uint16_t. |
JpegxlDataType_JPEGXL_TYPE_UINT32 | Use type uint32_t. |
JpegxlDecoderStatus_JPEGXL_DEC_ANIMATION_HEADER | Informative event: animation header from the codestream header. |
JpegxlDecoderStatus_JPEGXL_DEC_BASIC_INFO | Informative event: basic information such as image dimensions and extra channels. |
JpegxlDecoderStatus_JPEGXL_DEC_COLOR_ENCODING | Informative event: color encoding or ICC profile from the codestream header. |
JpegxlDecoderStatus_JPEGXL_DEC_DC | Informative event: DC image, 8x8 sub-sampled image. |
JpegxlDecoderStatus_JPEGXL_DEC_ERROR | An error occured, for example invalid input file or out of memory. TODO(lode): add function to get error information from decoder. |
JpegxlDecoderStatus_JPEGXL_DEC_EXTENSIONS | Informative event: user extensions of the codestream header. |
JpegxlDecoderStatus_JPEGXL_DEC_FULL_IMAGE | Informative event: full image decoded. |
JpegxlDecoderStatus_JPEGXL_DEC_NEED_MORE_INPUT | The decoder needs more input bytes to continue. In the next JpegxlDecoderProcessInput call, next_in and avail_in must point to more bytes to continue. If *avail_in is not 0, the new bytes must be appended to the *avail_in last previous bytes. |
JpegxlDecoderStatus_JPEGXL_DEC_NEED_MORE_OUTPUT | The decoder needs an output buffer to continue. Which output buffers it needs depends on events subscribed to with JpegxlDecoderSubscribeEvents. |
JpegxlDecoderStatus_JPEGXL_DEC_PREVIEW_HEADER | Informative event: preview header from the codestream header. |
JpegxlDecoderStatus_JPEGXL_DEC_SUCCESS | Function call finished sucessfully, or decoding is finished and there is nothing more to be done. |
JpegxlExtraChannelType_JPEGXL_CHANNEL_ALPHA | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_BLACK | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_CFA | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_DEPTH | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_OPTIONAL | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_RESERVED0 | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_RESERVED1 | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_RESERVED2 | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_RESERVED3 | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_RESERVED4 | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_RESERVED5 | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_RESERVED6 | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_RESERVED7 | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_SELECTION_MASK | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_SPOT_COLOR | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_THERMAL | |
JpegxlExtraChannelType_JPEGXL_CHANNEL_UNKNOWN | |
JpegxlFrameBase_JPEGXL_FRAME_BASE_CURRENT_FRAME | The next frame will be based on the current one. |
JpegxlFrameBase_JPEGXL_FRAME_BASE_EXISTING | The next frame will be based on the same frame as the current one. |
JpegxlFrameBase_JPEGXL_FRAME_BASE_NONE | The next frame will be a full frame (have_crop = false) and will not be based on any frame, but start from a value of 0 in main and extra channels. |
JpegxlOrientation_JPEGXL_ORIENT_ANTI_TRANSPOSE | |
JpegxlOrientation_JPEGXL_ORIENT_FLIP_HORIZONTAL | |
JpegxlOrientation_JPEGXL_ORIENT_FLIP_VERTICAL | |
JpegxlOrientation_JPEGXL_ORIENT_IDENTITY | |
JpegxlOrientation_JPEGXL_ORIENT_ROTATE_90_CCW | |
JpegxlOrientation_JPEGXL_ORIENT_ROTATE_90_CW | |
JpegxlOrientation_JPEGXL_ORIENT_ROTATE_180 | |
JpegxlOrientation_JPEGXL_ORIENT_TRANSPOSE | |
JpegxlPrimaries_JPEGXL_PRIMARIES_2100 | As specified in Rec. ITU-R BT.2100-1 |
JpegxlPrimaries_JPEGXL_PRIMARIES_CUSTOM | Custom white point stored in JpegxlColorEncoding primaries_red_xy, primaries_green_xy and primaries_blue_xy. |
JpegxlPrimaries_JPEGXL_PRIMARIES_P3 | As specified in SMPTE RP 431-2 |
JpegxlPrimaries_JPEGXL_PRIMARIES_SRGB | The CIE xy values of the red, green and blue primaries are: 0.639998686, 0.330010138; 0.300003784, 0.600003357; 0.150002046, 0.059997204 |
JpegxlRenderingIntent_JPEGXL_RENDERING_INTENT_ABSOLUTE | ICC-absolute |
JpegxlRenderingIntent_JPEGXL_RENDERING_INTENT_PERCEPTUAL | vendor-specific |
JpegxlRenderingIntent_JPEGXL_RENDERING_INTENT_RELATIVE | media-relative |
JpegxlRenderingIntent_JPEGXL_RENDERING_INTENT_SATURATION | vendor-specific |
JpegxlSignatureType_JPEGXL_SIG_TYPE_JPEG | JPEG codestream, which would preferably also be decoded using this decoder in case the codestream contains JPEG XL extensions (marker segments). |
JpegxlSignatureType_JPEGXL_SIG_TYPE_JPEGXL | JPEG XL codestream. |
JpegxlSignatureType_JPEGXL_SIG_TYPE_TRANSCODED_JPEG | Transcoded JPEG image signature was found. The decoder will be able to transcode back to the JPEG codestream passed to the encoder. |
JpegxlSignature_JPEGXL_SIG_INVALID | No valid JPEGXL header was found. |
JpegxlSignature_JPEGXL_SIG_NOT_ENOUGH_BYTES | Not enough bytes were passed to determine if a valid signature was found. |
JpegxlSignature_JPEGXL_SIG_VALID | A valid JPEG XL image signature was found, which could be a JPEG XL codestream, a transcoded JPEG image, or a JPEG XL container. This also includes the case of a JPEG codestream, which would preferably also be decoded using this decoder in case the codestream contains JPEG XL extensions (marker segments). |
JpegxlTransferFunction_JPEGXL_TRANSFER_FUNCTION_709 | As specified in SMPTE RP 431-2 |
JpegxlTransferFunction_JPEGXL_TRANSFER_FUNCTION_DCI | As specified in SMPTE ST 428-1 |
JpegxlTransferFunction_JPEGXL_TRANSFER_FUNCTION_GAMMA | Transfer function follows power law given by the gamma value in JpegxlColorEncoding. Not a CICP value. |
JpegxlTransferFunction_JPEGXL_TRANSFER_FUNCTION_HLG | As specified in Rec. ITU-R BT.2100-1 (HLG) |
JpegxlTransferFunction_JPEGXL_TRANSFER_FUNCTION_LINEAR | The gamma exponent is 1 |
JpegxlTransferFunction_JPEGXL_TRANSFER_FUNCTION_PQ | As specified in SMPTE ST 428-1 |
JpegxlTransferFunction_JPEGXL_TRANSFER_FUNCTION_SRGB | As specified in IEC 61966-2-1 sRGB |
JpegxlTransferFunction_JPEGXL_TRANSFER_FUNCTION_UNKNOWN | None of the other table entries describe the transfer function. |
JpegxlWhitePoint_JPEGXL_WHITE_POINT_CUSTOM | Custom white point stored in JpegxlColorEncoding white_point. |
JpegxlWhitePoint_JPEGXL_WHITE_POINT_D65 | CIE Standard Illuminant D65: 0.3127, 0.3290 |
JpegxlWhitePoint_JPEGXL_WHITE_POINT_DCI | DCI-P3 from SMPTE RP 431-2: 0.314, 0.351 |
JpegxlWhitePoint_JPEGXL_WHITE_POINT_E | CIE Standard Illuminant E (equal-energy): 1/3, 1/3 |
Traits
NewUninit | Convinient function to just return a block of memory.
You need to assign |
Functions
JpegxlDecoderCreate⚠ | Creates an instance of JpegxlDecoder and initializes it. |
JpegxlDecoderDCOutBufferSize⚠ | Returns the size in bytes the DC image output pixel buffer requires at least to contain the DC image pixels in the given format. This is the minumum size of the buffer for JpegxlDecoderSetDCOutBuffer. Requires the basic image information is available in the decoder. |
JpegxlDecoderDestroy⚠ | Deinitializes and frees JpegxlDecoder instance. |
JpegxlDecoderGetAnimationHeader⚠ | Outputs the animation header, if available. |
JpegxlDecoderGetBasicInfo⚠ | Outputs the basic image information, such as image dimensions, bit depth and all other JpegxlBasicInfo fields, if available. |
JpegxlDecoderGetColorEncoding⚠ | Outputs the color profile information, if available. Only may be used if JpegxlColorProfileSource.color_encoding_valid. |
JpegxlDecoderGetColorProfileSource⚠ | Outputs the color information, if available. The color info tells whether JpegxlDecoderGetColorEncoding and/or JpegxlDecoderGetICCProfile should be used to get the correct image color profile. |
JpegxlDecoderGetExtraChannelInfo⚠ | Outputs information for extra channel at the given index. The index must be smaller than num_extra_channels in the associated JpegxlBasicInfo. |
JpegxlDecoderGetExtraChannelName⚠ | Outputs name for extra channel at the given index in UTF-8. The index must be smaller than num_extra_channels in the associated JpegxlBasicInfo. The buffer for name must have at least name_length + 1 bytes allocated, gotten from the associated JpegxlExtraChannelInfo. |
JpegxlDecoderGetICCProfile⚠ | Outputs ICC profile. The output buffer should have enough bytes allocated to contain the icc_size given in the JpegxlColorEncoding. |
JpegxlDecoderGetPreviewHeader⚠ | Outputs the preview header, if available. |
JpegxlDecoderImageOutBufferSize⚠ | Returns the size in bytes the image output pixel buffer requires at least to contain all pixels in the given format. This is the minumum size of the buffer for JpegxlDecoderSetImageOutBuffer. Requires the basic image information is available in the decoder. |
JpegxlDecoderProcessInput⚠ | Decodes JPEG XL file using the available bytes. @p *avail_in indicates how many input bytes are available, and @p *next_in points to the input bytes. *avail_in will be decremented by the amount of bytes that have been processed by the decoder and *next_in will be incremented by the same amount, so *next_in will now point at the amount of *avail_in unprocessed bytes. For the next call to this function, all unprocessed bytes must be provided again (the address need not match, but the contents must), and more bytes may be concatenated after the unprocessed bytes. |
JpegxlDecoderSetDCOutBuffer⚠ | Sets the buffer to write the lower resolution (8x8 sub-sampled) DC image to. The size of the buffer must be at least as large as given by JpegxlDecoderDCOutBufferSize. The buffer follows the format described by JpegxlPixelFormat. The DC image has dimensions ceil(sizex / 8) * ceil(sizey / 8). The buffer is owned by the caller. |
JpegxlDecoderSetImageOutBuffer⚠ | Sets the buffer to write the full resolution image to. The size of the buffer must be at least as large as given by JpegxlDecoderImageOutBufferSize. The buffer follows the format described by JpegxlPixelFormat. The buffer is owned by the caller. |
JpegxlDecoderSetParallelRunner⚠ | Set the parallel runner for multithreading. May only be set before starting decoding. |
JpegxlDecoderSizeHintBasicInfo⚠ | Returns a hint indicating how many more bytes the decoder is expected to need to make JpegxlDecoderGetBasicInfo available after the next JpegxlDecoderProcessInput call. This is a suggested large enough value for the *avail_in parameter, but it is not guaranteed to be an upper bound nor a lower bound. Can be used before the first JpegxlDecoderProcessInput call, and is correct the first time in most cases. If not, JpegxlDecoderSizeHintBasicInfo can be called again to get an updated hint. |
JpegxlDecoderSubscribeEvents⚠ | Select for which informative events (JPEGXL_DEC_BASIC_INFO, etc...) the decoder should return with a status. It is not required to subscribe to any events, data can still be requested from the decoder as soon as it available. By default, the decoder is subscribed to no events (events_wanted == 0), and the decoder will then only return when it cannot continue because it needs more input data or more output buffer. This function may only be be called before using JpegxlDecoderProcessInput |
JpegxlDecoderVersion⚠ | Decoder library version. |
JpegxlSignatureCheck⚠ | JPEG XL signature identification. |
Type Definitions
JpegxlBlendMode | Indicates how to combine the current frame with the previous "base". Stored in FrameHeader and ExtraChannelInfo to allow independent control for main and extra channels. |
JpegxlColorSpace | Color space of the image data. |
JpegxlDataType | Data type for the sample values per channel per pixel. |
JpegxlDecoder | Opaque structure that holds the JPEGXL decoder. |
JpegxlDecoderStatus | Return value for JpegxlDecoderProcessInput. The values above 64 are optional informal events that can be subscribed to. |
JpegxlExtraChannelType | Given type of an extra channel. |
JpegxlFrameBase | Indicates what the next frame will be "based" on. A full frame (have_crop = false) can be based on a frame if and only if the frame and the base are lossy. The rendered frame will then be the sum of the two. A cropped frame can be based on any kind of frame. The rendered frame will be obtained by blitting. Stored in FrameHeader and ExtraChannelInfo to allow independent control for main and extra channels. |
JpegxlMemoryManager | Memory Manager struct. These functions, when provided by the caller, will be used to handle memory allocations. |
JpegxlOrientation | Image orientation metadata. Values 1..8 match the EXIF definitions. The name indicates the operation to perform to transform from the encoded image to the display image. |
JpegxlParallelRetCode | Return code used in the JpegxlParallel* functions as return value. A value of 0 means success and any other value means error. The special value JPEGXL_PARALLEL_RET_RUNNER_ERROR can be used by the runner to indicate any other error. |
JpegxlParallelRunFunction | Parallel run data processing callback. See JpegxlParallelRunner for details. |
JpegxlParallelRunInit | Parallel run initialization callback. See JpegxlParallelRunner for details. |
JpegxlParallelRunner | JpegxlParallelRunner function type. A parallel runner implementation can be provided by a JPEG XL caller to allow running computations in multiple threads. This function must call the initialization function @p init in the same thread that called it and then call the passed @p func once for every number in the range [start_range, end_range) (including start_range but not including end_range) possibly from different multiple threads in parallel. |
JpegxlPrimaries | Built-in primaries for color encoding. Numeric values match CICP (Rec. ITU-T H.273 | ISO/IEC 23091-2:2019(E)). |
JpegxlRenderingIntent | Renderig intent for color encoding, as specified in ISO 15076-1:2010 |
JpegxlSignature | The result of JpegxlSignatureCheck. |
JpegxlSignatureType | Signature type of the codestream. |
JpegxlTransferFunction | Built-in transfer functions for color encoding. Numeric values match CICP (Rec. ITU-T H.273 | ISO/IEC 23091-2:2019(E)) unless specified otherwise. |
JpegxlWhitePoint | Built-in whitepoints for color encoding. Numeric values match CICP (Rec. ITU-T H.273 | ISO/IEC 23091-2:2019(E)). |
int_fast8_t | |
int_fast16_t | |
int_fast32_t | |
int_fast64_t | |
int_least8_t | |
int_least16_t | |
int_least32_t | |
int_least64_t | |
intmax_t | |
jpegxl_alloc_func | Allocating function for a memory region of a given size. |
jpegxl_free_func | Deallocating function pointer type. |
max_align_t | |
size_t | |
uint_fast8_t | |
uint_fast16_t | |
uint_fast32_t | |
uint_fast64_t | |
uint_least8_t | |
uint_least16_t | |
uint_least32_t | |
uint_least64_t | |
uintmax_t | |
wchar_t |