Skip to main content

JxlCmsInterface

Struct JxlCmsInterface 

Source
#[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_void

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

§set_fields_from_icc: jpegxl_cms_set_fields_from_icc_func

Populates a @ref JxlColorEncoding from an ICC profile.

§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§

Source§

impl Clone for JxlCmsInterface

Source§

fn clone(&self) -> JxlCmsInterface

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for JxlCmsInterface

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for JxlCmsInterface

Source§

fn default() -> Self

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

impl Copy for JxlCmsInterface

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.