Function mupdf_sys::fz_convert_pixmap[][src]

pub unsafe extern "C" fn fz_convert_pixmap(
    ctx: *mut fz_context,
    pix: *const fz_pixmap,
    cs_des: *mut fz_colorspace,
    prf: *mut fz_colorspace,
    default_cs: *mut fz_default_colorspaces,
    color_params: fz_color_params,
    keep_alpha: c_int
) -> *mut fz_pixmap

Convert an existing pixmap to a desired colorspace. Other properties of the pixmap, such as resolution and position are copied to the converted pixmap.

pix: The pixmap to convert.

default_cs: If NULL pix->colorspace is used. It is possible that the data may need to be interpreted as one of the color spaces in default_cs.

cs_des: Desired colorspace, may be NULL to denote alpha-only.

prf: Proofing color space through which we need to convert.

color_params: Parameters that may be used in conversion (e.g. ri).

keep_alpha: If 0 any alpha component is removed, otherwise alpha is kept if present in the pixmap.