load_rect

Function load_rect 

Source
pub(crate) fn load_rect<D, F1, F2, E>(
    x: u32,
    y: u32,
    width: u32,
    height: u32,
    buf: &mut [u8],
    row_pitch: usize,
    decoder: &mut D,
    scanline_bytes: usize,
    seek_scanline: F1,
    read_scanline: F2,
) -> ImageResult<()>
where D: ImageDecoder, F1: FnMut(&mut D, u64) -> Result<()>, F2: FnMut(&mut D, &mut [u8]) -> Result<(), E>, ImageError: From<E>,
Expand description

Decodes a specific region of the image, represented by the rectangle starting from x and y and having length and width