#[repr(C)]
pub struct JxlCmsInterface { pub init_data: *mut c_void, pub init: jpegxl_cms_init_func, pub get_src_buf: jpegxl_cms_get_buffer_func, pub get_dst_buf: jpegxl_cms_get_buffer_func, pub run: jpegxl_cms_run_func, pub destroy: jpegxl_cms_destroy_func, }
Expand description

Interface for performing colorspace transforms. The @c init function can be called several times to instantiate several transforms, including before other transforms have been destroyed.

The call sequence for a given colorspace transform could look like the following: @dot digraph calls { newrank = true node [shape = box, fontname = monospace] init [label = “user_data <- init(\l
init_data = data,\l
num_threads = 3,\l
pixels_per_thread = 20,\l
input = (sRGB, 3 channels),\l
output = (Display-P3, 3 channels),\l
intensity_target = 255\l
)\l”] subgraph cluster_0 { color = lightgrey label = “thread 1” labeljust = “c” run_1_1 [label = “run(\l
user_data,\l
thread = 1,\l
input = in[0],\l
output = out[0],\l
num_pixels = 20\l
)\l”] run_1_2 [label = “run(\l
user_data,\l
thread = 1,\l
input = in[3],\l
output = out[3],\l
num_pixels = 20\l
)\l”] } subgraph cluster_1 { color = lightgrey label = “thread 2” labeljust = “l” run_2_1 [label = “run(\l
user_data,\l
thread = 2,\l
input = in[1],\l
output = out[1],\l
num_pixels = 20\l
)\l”] run_2_2 [label = “run(\l
user_data,\l
thread = 2,\l
input = in[4],\l
output = out[4],\l
num_pixels = 13\l
)\l”] } subgraph cluster_3 { color = lightgrey label = “thread 3” labeljust = “c” run_3_1 [label = “run(\l
user_data,\l
thread = 3,\l
input = in[2],\l
output = out[2],\l
num_pixels = 20\l
)\l”] } init -> {run_1_1; run_2_1; run_3_1; rank = same} run_1_1 -> run_1_2 run_2_1 -> run_2_2 {run_1_2; run_2_2, run_3_1} -> “destroy(user_data)” } @enddot

Fields

init_data: *mut c_void

CMS-specific data that will be passed to @ref init.

init: jpegxl_cms_init_func

Prepares a colorspace transform as described in the documentation of @ref jpegxl_cms_init_func.

get_src_buf: jpegxl_cms_get_buffer_func

Returns a buffer that can be used as input to @c run.

get_dst_buf: jpegxl_cms_get_buffer_func

Returns a buffer that can be used as output from @c run.

run: jpegxl_cms_run_func

Executes the transform on a batch of pixels, per @ref jpegxl_cms_run_func.

destroy: jpegxl_cms_destroy_func

Cleans up the transform.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.