Skip to main content

SubformatDecodeFn

Type Alias SubformatDecodeFn 

Source
pub type SubformatDecodeFn = Box<dyn Fn(&[u8], u32, &mut [u8], u64) -> ImageResult<()>>;
Expand description

A function type used to decode a square embedded image.

Arguments:

  • data: &[u8]: complete data for the embedded image to decode
  • size: u32: the expected width and height of the image. Will be > 0 and <= 1024
  • buf: &mut [u8]: array of bytes into which to write RGBA data. Will have size 4*size*size
  • allocation_limit: u64: a soft limit on how much memory to allocate while decoding

Aliased Typeยง

pub struct SubformatDecodeFn(/* private fields */);