[][src]Function webp_dev::sys::webp::webp_inew_rgb

pub unsafe fn webp_inew_rgb(
    csp: WebPCSPMode,
    output_buffer: *mut u8,
    output_buffer_size: usize,
    output_stride: c_int
) -> *mut WebPIDecoder

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.