pub unsafe extern "C" fn fz_new_pixmap_with_data(
    ctx: *mut fz_context,
    colorspace: *mut fz_colorspace,
    w: c_int,
    h: c_int,
    seps: *mut fz_separations,
    alpha: c_int,
    stride: c_int,
    samples: *mut c_uchar
) -> *mut fz_pixmap
Expand description

Create a new pixmap, with its origin at (0,0) using the supplied data block.

cs: The colorspace to use for the pixmap, or NULL for an alpha plane/mask.

w: The width of the pixmap (in pixels)

h: The height of the pixmap (in pixels)

seps: Details of separations.

alpha: 0 for no alpha, 1 for alpha.

stride: The byte offset from the pixel data in a row to the pixel data in the next row.

samples: The data block to keep the samples in.

Returns a pointer to the new pixmap. Throws exception on failure to allocate.