#[repr(C)]pub struct JxlCmsInterface {
pub set_fields_data: *mut c_void,
pub set_fields_from_icc: jpegxl_cms_set_fields_from_icc_func,
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§
§set_fields_data: *mut c_voidCMS-specific data that will be passed to @ref set_fields_from_icc.
set_fields_from_icc: jpegxl_cms_set_fields_from_icc_funcPopulates a @ref JxlColorEncoding from an ICC profile.
init_data: *mut c_voidCMS-specific data that will be passed to @ref init.
init: jpegxl_cms_init_funcPrepares a colorspace transform as described in the documentation of @ref jpegxl_cms_init_func.
get_src_buf: jpegxl_cms_get_buffer_funcReturns a buffer that can be used as input to @c run.
get_dst_buf: jpegxl_cms_get_buffer_funcReturns a buffer that can be used as output from @c run.
run: jpegxl_cms_run_funcExecutes the transform on a batch of pixels, per @ref jpegxl_cms_run_func.
destroy: jpegxl_cms_destroy_funcCleans up the transform.
Trait Implementations§
Source§impl Clone for JxlCmsInterface
impl Clone for JxlCmsInterface
Source§fn clone(&self) -> JxlCmsInterface
fn clone(&self) -> JxlCmsInterface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more