Function png_filters::unfilter_lines

source ·
pub fn unfilter_lines<const BYTES_PER_PIXEL: usize>(
    lines: ChunksExactMut<'_, u8>
)
Expand description

Given the bytes for each filtered line, unfilters the data in place.

On each line, the first byte of the line will be the filter type, and the following bytes will be the image data. The number of following bytes should evenly divide by BYTES_PER_PIXEL.

§Panics

  • assert!(BYTES_PER_PIXEL <= 8);
  • debug_assert_eq!(following_bytes.len() % BYTES_PER_PIXEL, 0);