Skip to main content

load

Function load 

Source
pub fn load(
    doc: &Document,
    stream: &Stream,
    res: Option<&Dictionary>,
    reduction_shift: u32,
) -> Result<LoadedImage, String>
Expand description

Decode an image XObject (or inline image) into samples. reduction_shift asks the JPEG decoder for a 1 / 2^shift reduced decode when the image allows one (codec_reduction_shift, [may_reduce_decode]); the loaded image then reports the reduced size.