Skip to main content

encode_jpeg_ls

Function encode_jpeg_ls 

Source
pub fn encode_jpeg_ls(
    pixels: &[u8],
    width: u32,
    height: u32,
    bits_per_sample: u8,
    components: u8,
    near: i32,
) -> DcmResult<Vec<u8>>
Expand description

Encode raw pixels as a JPEG-LS compressed bitstream.

  • pixels — raw pixel data in native byte order (LE for multi-byte)
  • width, height — image dimensions
  • bits_per_sample — 2–16
  • components — 1–4
  • near — 0 for lossless, >0 for near-lossless