Skip to main content

wrap_j2k_codestream

Function wrap_j2k_codestream 

Source
pub fn wrap_j2k_codestream(
    codestream: &[u8],
    options: J2kFileWrapOptions<'_>,
) -> Result<Vec<u8>, J2kError>
Expand description

Wrap a raw JPEG 2000 / HTJ2K codestream in a JP2 or JPH file container.

The codestream is inspected with the existing parser before any boxes are written. Component precision, signedness, and sampling metadata come from the codestream SIZ marker. Mixed precision or mixed signedness is emitted via the JP2 bpcc box.