pub unsafe extern "C-unwind" fn JxlEncoderSetExtraChannelBuffer(
frame_settings: *const JxlEncoderFrameSettings,
pixel_format: *const JxlPixelFormat,
buffer: *const c_void,
size: usize,
index: u32,
) -> JxlEncoderStatusExpand description
Sets the buffer to read pixels from for an extra channel at a given index.
The index must be smaller than the num_extra_channels in the associated
JxlBasicInfo. Must call JxlEncoderSetExtraChannelInfo before
JxlEncoderSetExtraChannelBuffer.
TODO: mention what data types in pixel formats are supported.
It is required to call this function for every extra channel, except for the
alpha channel if that was already set through JxlEncoderAddImageFrame.
§Parameters
frame_settings: Set of options and metadata for this frame. Also includes reference to the encoder object.pixel_format: Format for pixels. Object owned by the caller and its contents are copied internally. Thenum_channelsvalue is ignored, since the number of channels for an extra channel is always assumed to be one.buffer: Buffer type to input the pixel data from. Owned by the caller and its contents are copied internally.size: Size of buffer in bytes. This size should match what is implied by the frame dimensions and the pixel format.index: Index of the extra channel to use.
§Returns
JxlEncoderStatus::Successon success.JxlEncoderStatus::Erroron error.