Function qoi::decode::decode_to_buf

source ยท
pub fn decode_to_buf(
    buf: impl AsMut<[u8]>,
    data: impl AsRef<[u8]>,
) -> Result<Header>
Expand description

Decode the image into a pre-allocated buffer.

Note: the resulting number of channels will match the header. In order to change the number of channels, use Decoder::with_channels.