Skip to main content

Crate jpegxr

Crate jpegxr 

Source
Expand description

Safe JPEG-XR decode, encode, and transcode API backed by a faithful Rust translation of JXRLib.

Structs§

DecodedImage
Decoder
Encoder
EncoderOptions
PixelFormat

Enums§

BitDepth
ChannelOrder
ColorFormat
EncoderColorFormat
Error
PixelInterpretation
SampleFormat
WmpError
Crate-wide error type: the idiomatic replacement for BOTH C error families — the glue/stream WMP_err* codes (ERR/int, windowsmediaphoto.h) and the codec ERR_CODE status (ICERR_OK/ICERR_ERROR). Every function whose original C returned one of those integer codes returns Result<T, WmpError>: success (WMP_errSuccess / ICERR_OK, both 0) maps to Ok(...), and each failure code maps to the matching variant. The generic codec failure ICERR_ERROR (== WMP_errFail, both -1) is WmpError::Fail; where the cause is known, a more specific variant is used.

Functions§

decode_bytes
Decodes an already-loaded JPEG-XR buffer without copying the input bytes.
decode_file
decode_reader
encode_to_path
encode_to_vec
encode_to_writer
transcode_bytes_to_vec
transcode_file_to_path
transcode_reader_to_writer

Type Aliases§

Result