[−][src]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
.
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]
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 AsMut<StageRef> for Stage
[src]
impl AsRef<StageRef> for Stage
[src]
impl Borrow<StageRef> for Stage
[src]
impl BorrowMut<StageRef> for Stage
[src]
fn borrow_mut(&mut self) -> &mut StageRef
[src]
impl Deref for Stage
[src]
impl DerefMut for Stage
[src]
impl Drop for Stage
[src]
impl ForeignType for Stage
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,