[−][src]Function mupdf_sys::fz_new_image_of_size
pub unsafe extern "C" fn fz_new_image_of_size(
ctx: *mut fz_context,
w: c_int,
h: c_int,
bpc: c_int,
colorspace: *mut fz_colorspace,
xres: c_int,
yres: c_int,
interpolate: c_int,
imagemask: c_int,
decode: *mut f32,
colorkey: *mut c_int,
mask: *mut fz_image,
size: usize,
get_pixmap: fz_image_get_pixmap_fn,
get_size: fz_image_get_size_fn,
drop: fz_drop_image_fn
) -> *mut fz_image
Internal function to make a new fz_image structure for a derived class.
w,h: Width and height of the created image.
bpc: Bits per component.
colorspace: The colorspace (determines the number of components, and any color conversions required while decoding).
xres, yres: The X and Y resolutions respectively.
interpolate: 1 if interpolation should be used when decoding this image, 0 otherwise.
imagemask: 1 if this is an imagemask (i.e. transparent), 0 otherwise.
decode: NULL, or a pointer to to a decode array. The default decode array is [0 1] (repeated n times, for n color components).
colorkey: NULL, or a pointer to a colorkey array. The default colorkey array is [0 255] (repeated n times, for n color components).
mask: NULL, or another image to use as a mask for this one. A new reference is taken to this image. Supplying a masked image as a mask to another image is illegal!
size: The size of the required allocated structure (the size of the derived structure).
get: The function to be called to obtain a decoded pixmap.
get_size: The function to be called to return the storage size used by this image.
drop: The function to be called to dispose of this image once the last reference is dropped.
Returns a pointer to an allocated structure of the required size, with the first sizeof(fz_image) bytes initialised as appropriate given the supplied parameters, and the other bytes set to zero.