Function webp_decode_rgba_into

Source
pub unsafe fn webp_decode_rgba_into(
    data: *const u8,
    data_size: usize,
    output_buffer: *mut u8,
    output_buffer_size: usize,
    output_stride: c_int,
) -> *mut u8
Expand description

These five functions are variants of the above ones, that decode the image directly into a pre-allocated buffer ‘output_buffer’.

The maximum storage available in this buffer is indicated by ‘output_buffer_size’. If this storage is not sufficient (or an error occurred), NULL is returned. Otherwise, output_buffer is returned, for convenience. The parameter ‘output_stride’ specifies the distance (in bytes) between scanlines. Hence, output_buffer_size is expected to be at least output_stride x picture-height.