Struct lcms2::Stage
[−]
pub struct Stage(_);
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 ForeignType for Stage
type CType = Stage
The raw C type.
type Ref = StageRef
The type representing a reference to this type.
unsafe fn from_ptr(ptr: *mut Stage) -> Stage
Constructs an instance of this type from its raw type.
fn as_ptr(&self) -> *mut Stage
Returns a raw pointer to the wrapped value.
impl Drop for Stage
impl Deref for Stage
type Target = StageRef
The resulting type after dereferencing.
fn deref(&self) -> &StageRef
Dereferences the value.