[][src]Struct lcms2::Stage

#[repr(transparent)]pub struct 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.

Implementations

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]

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]

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 AsMut<StageRef> for Stage[src]

impl AsRef<StageRef> for Stage[src]

impl Borrow<StageRef> for Stage[src]

impl BorrowMut<StageRef> for Stage[src]

impl Deref for Stage[src]

type Target = StageRef

The resulting type after dereferencing.

impl DerefMut for Stage[src]

impl Drop for Stage[src]

impl ForeignType for Stage[src]

type CType = Stage

The raw C type.

type Ref = StageRef

The type representing a reference to this type.

Auto Trait Implementations

impl RefUnwindSafe for Stage

impl !Send for Stage

impl !Sync for Stage

impl Unpin for Stage

impl UnwindSafe for Stage

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.