Type Definition libjxl_sys::JxlImageOutCallback[][src]

type JxlImageOutCallback = Option<unsafe extern "C" fn(opaque: *mut c_void, x: usize, y: usize, xsize: usize, pixels: *const c_void)>;

Callback function type for JxlDecoderSetImageOutCallback. @see JxlDecoderSetImageOutCallback for usage.

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

@param opaque optional user data, as given to JxlDecoderSetImageOutCallback. @param x horizontal position of leftmost pixel of the pixel data. @param y vertical position of the pixel data. @param xsize amount of pixels included in the pixel data, horizontally. This is not the same as xsize of the full image, it may be smaller. @param 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.