Skip to main content

extract_lsb_pattern

Function extract_lsb_pattern 

Source
pub fn extract_lsb_pattern(pixel_bytes: &[u8]) -> Bytes
Expand description

Extract the LSB bit pattern from raw pixel bytes.

For each byte of pixel data, extracts the least significant bit and packs 8 bits into one output byte. The result length is ceil(pixel_bytes.len() / 8).