JxlDecoderSetImageOutBuffer

Function JxlDecoderSetImageOutBuffer 

Source
pub unsafe extern "C-unwind" fn JxlDecoderSetImageOutBuffer(
    dec: *mut JxlDecoder,
    format: *const JxlPixelFormat,
    buffer: *mut c_void,
    size: usize,
) -> JxlDecoderStatus
Expand description

Sets the buffer to write the full resolution image to. This can be set when the JxlDecoderStatus::Frame event occurs, must be set when the JxlDecoderStatus::NeedImageOutBuffer event occurs, and applies only for the current frame. The size of the buffer must be at least as large as given by JxlDecoderImageOutBufferSize. The buffer follows the format described by JxlPixelFormat. The buffer is owned by the caller.

§Parameters

  • dec: decoder object
  • format: format of the pixels. Object owned by user and its contents are copied internally.
  • buffer: buffer type to output the pixel data to
  • size: size of buffer in bytes

§Returns