Type Definition mupdf_sys::fz_image_get_pixmap_fn[][src]

pub type fz_image_get_pixmap_fn = Option<unsafe extern "C" fn(ctx: *mut fz_context, im: *mut fz_image, subarea: *mut fz_irect, w: c_int, h: c_int, l2factor: *mut c_int) -> *mut fz_pixmap>;
Expand description

Function type to get a decoded pixmap for an image.

im: The image to decode.

subarea: NULL, or the subarea of the image required. Expressed in terms of a rectangle in the original width/height of the image. If non NULL, this should be updated by the function to the actual subarea decoded - which must include the requested area!

w, h: The actual width and height that the whole image would need to be decoded to.

l2factor: On entry, the log 2 subsample factor required. If possible the decode process can take care of (all or some) of this subsampling, and must then update the value so the caller knows what remains to be done.

Returns a reference to a decoded pixmap that satisfies the requirements of the request. The caller owns the returned reference.