pub unsafe extern "C-unwind" fn JxlDecoderSetPreviewOutBuffer(
dec: *mut JxlDecoder,
format: *const JxlPixelFormat,
buffer: *mut c_void,
size: usize,
) -> JxlDecoderStatusExpand description
Sets the buffer to write the low-resolution preview image
to. The size of the buffer must be at least as large as given by JxlDecoderPreviewOutBufferSize.
The buffer follows the format described by JxlPixelFormat. The preview image dimensions are given by the
JxlPreviewHeader. The buffer is owned by the caller.
§Parameters
dec: decoder objectformat: format of pixels. Object owned by user and its contents are copied internally.buffer: buffer type to output the pixel data tosize: size of buffer in bytes
§Returns
JxlDecoderStatus::Successon success,JxlDecoderStatus::Erroron error, such as size too small.