openslide_read_region

Function openslide_read_region 

Source
pub unsafe extern "C" fn openslide_read_region(
    osr: *mut openslide_t,
    dest: *mut u32,
    x: i64,
    y: i64,
    level: i32,
    w: i64,
    h: i64,
)
Expand description

Copy pre-multiplied ARGB data from a whole slide image.

This function reads and decompresses a region of a whole slide image into the specified memory location. @p dest must be a valid pointer to enough memory to hold the region, at least (@p w * @p h * 4) bytes in length. If an error occurs or has occurred, then the memory pointed to by @p dest will be cleared.

@param osr The OpenSlide object. @param dest The destination buffer for the ARGB data. @param x The top left x-coordinate, in the level 0 reference frame. @param y The top left y-coordinate, in the level 0 reference frame. @param level The desired level. @param w The width of the region. Must be non-negative. @param h The height of the region. Must be non-negative.