[−]Struct lcms2::Stage
Stage functions
Stages are single-step operations that can be chained to create pipelines. Actual stage types does include matrices, tone curves, Look-up interpolation and user-defined. There are functions to create new stage types and a plug-in type to allow stages to be saved in multi profile elements tag types. See the plug-in API for further details.
This is an owned version of Stage
.
Methods
impl Stage
[src]
pub fn new_identity(channels: u32) -> Stage
[src]
Creates an empty (identity) stage that does no operation.
May be needed in order to save the pipeline as AToB/BToA tags in ICC profiles.
pub fn new_tone_curves(curves: &[&ToneCurveRef]) -> LCMSResult<Stage>
[src]
Creates a stage that contains nChannels tone curves, one per channel.
pub fn new_matrix(
matrix2d: &[f64],
rows: usize,
cols: usize,
offsets: Option<&[f64]>
) -> LCMSResult<Self>
[src]
matrix2d: &[f64],
rows: usize,
cols: usize,
offsets: Option<&[f64]>
) -> LCMSResult<Self>
Creates a stage that contains a matrix plus an optional offset.
Note that Matrix is specified in double precision, whilst CLUT has only float precision. That is because an ICC profile can encode matrices with far more precision that CLUTS.
pub fn new_clut<Value: FloatOrU16>(
grid_point_nodes: usize,
input_channels: u32,
output_channels: u32,
table: Option<&[Value]>
) -> LCMSResult<Self>
[src]
grid_point_nodes: usize,
input_channels: u32,
output_channels: u32,
table: Option<&[Value]>
) -> LCMSResult<Self>
Creates a stage that contains a float or 16 bits multidimensional lookup table (CLUT).
Each dimension has same resolution. The CLUT can be initialized by specifying values in Table parameter. The recommended way is to set Table to None and use sample_clut with a callback, because this way the implementation is independent of the selected number of grid points.
Methods from Deref<Target = StageRef>
pub fn input_channels(&self) -> usize
[src]
pub fn output_channels(&self) -> usize
[src]
pub fn stage_type(&self) -> StageSignature
[src]
Trait Implementations
impl Drop for Stage
fn drop(&mut self)
impl AsMut<StageRef> for Stage
impl AsRef<StageRef> for Stage
impl DerefMut for Stage
impl Deref for Stage
impl Borrow<StageRef> for Stage
impl BorrowMut<StageRef> for Stage
fn borrow_mut(&mut self) -> &mut StageRef
impl ForeignType for Stage
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,