pub trait ImageDecoder: Send + Sync {
// Required methods
fn decode_image(
&self,
image_ref: &ImageRef,
matrix: &Matrix,
) -> Result<DecodedImage, RenderError>;
fn decode_inline_image(
&self,
properties: &HashMap<Name, Operand>,
data: &[u8],
matrix: &Matrix,
) -> Result<DecodedImage, RenderError>;
}Expand description
Trait for decoding PDF images at render time.
Implementations resolve image XObject references and inline image data into decoded pixel buffers.
Required Methods§
Sourcefn decode_image(
&self,
image_ref: &ImageRef,
matrix: &Matrix,
) -> Result<DecodedImage, RenderError>
fn decode_image( &self, image_ref: &ImageRef, matrix: &Matrix, ) -> Result<DecodedImage, RenderError>
Decode an image XObject.
Sourcefn decode_inline_image(
&self,
properties: &HashMap<Name, Operand>,
data: &[u8],
matrix: &Matrix,
) -> Result<DecodedImage, RenderError>
fn decode_inline_image( &self, properties: &HashMap<Name, Operand>, data: &[u8], matrix: &Matrix, ) -> Result<DecodedImage, RenderError>
Decode an inline image.