Skip to main content

Module codestream

Module codestream 

Source
Expand description

JPEG 2000 codestream parser and generator.

Port of ojph_codestream.h/cpp. The Codestream struct is the main entry point for encoding and decoding HTJ2K images.

§Encoding workflow

  1. Create a Codestream and configure parameters via access_siz_mut(), access_cod_mut(), and access_qcd_mut().
  2. Call write_headers() to emit the main header to an OutfileBase implementor.
  3. Push image lines with exchange().
  4. Call flush() to write tile data and the EOC marker.

§Decoding workflow

  1. Create a Codestream and call read_headers() on an InfileBase implementor.
  2. Optionally inspect SIZ/COD/QCD parameters.
  3. Call create() to build internal structures.
  4. Pull decoded lines with pull().

Modules§

bitbuffer_read
Bit-buffer reader for codestream parsing.
bitbuffer_write
Bit-buffer writer for codestream generation.

Structs§

Codestream
The main codestream interface for encoding and decoding HTJ2K images.