JxlImageOutCallback

Type Alias JxlImageOutCallback 

Source
pub type JxlImageOutCallback = extern "C" fn(opaque: *mut c_void, x: usize, y: usize, num_pixels: usize, pixels: *const c_void);
Expand description

Function type for JxlDecoderSetImageOutCallback.

The callback may be called simultaneously by different threads when using a threaded parallel runner, on different pixels.

ยงParameters

  • opaque: optional user data, as given to JxlDecoderSetImageOutCallback.
  • x: horizontal position of leftmost pixel of the pixel data.
  • y: vertical position of the pixel data.
  • num_pixels: amount of pixels included in the pixel data, horizontally. This is not the same as xsize of the full image, it may be smaller.
  • pixels: pixel data as a horizontal stripe, in the format passed to JxlDecoderSetImageOutCallback. The memory is not owned by the user, and is only valid during the time the callback is running.