Function jpegxl_sys::JxlEncoderAddImageFrame[][src]

pub unsafe extern "C" fn JxlEncoderAddImageFrame(
    options: *const JxlEncoderOptions,
    pixel_format: *const JxlPixelFormat,
    buffer: *const c_void,
    size: size_t
) -> JxlEncoderStatus

Sets the buffer to read pixels from for the next image to encode. Must call JxlEncoderSetDimensions before JxlEncoderAddImageFrame.

Currently only some pixel formats are supported:

  • JXL_TYPE_UINT8, input pixels assumed to be nonlinear SRGB encoded
  • JXL_TYPE_UINT16, input pixels assumed to be nonlinear SRGB encoded
  • JXL_TYPE_FLOAT, input pixels are assumed to be linear SRGB encoded

@param options set of encoder options to use when encoding the frame. @param pixel_format format for pixels. Object owned by the caller and its contents are copied internally. @param buffer buffer type to input the pixel data from. Owned by the caller and its contents are copied internally. @param size size of buffer in bytes. @return JXL_ENC_SUCCESS on success, JXL_ENC_ERROR on error