Function libwebp_sys::WebPINewRGB
source · pub unsafe extern "C" fn WebPINewRGB(
csp: WEBP_CSP_MODE,
output_buffer: *mut u8,
output_buffer_size: usize,
output_stride: c_int
) -> *mut WebPIDecoder
Expand description
This function allocates and initializes an incremental-decoder object, which will output the RGB/A samples specified by ‘csp’ into a preallocated buffer ‘output_buffer’. The size of this buffer is at least ‘output_buffer_size’ and the stride (distance in bytes between two scanlines) is specified by ‘output_stride’. Additionally, output_buffer can be passed NULL in which case the output buffer will be allocated automatically when the decoding starts. The colorspace ‘csp’ is taken into account for allocating this buffer. All other parameters are ignored. Returns NULL if the allocation failed, or if some parameters are invalid.