Struct CIECAM02

Source
pub struct CIECAM02 { /* private fields */ }
Expand description

CIE CAM02

Implementations§

Source§

impl CIECAM02

Source

pub fn new(conditions: ViewingConditions) -> LCMSResult<Self>

A CAM02 object based on given viewing conditions.

Such object may be used as a color appearance model and evaluated in forward and reverse directions. Viewing conditions structure is detailed in Table 43. The surround member has to be one of the values enumerated in Table 44. Degree of chromatic adaptation (d), can be specified in 0…1.0 range, or the model can be instructed to calculate it by using D_CALCULATE constant (-1).

Viewing conditions. Please note those are CAM model viewing conditions, and not the ICC tag viewing conditions, which I’m naming cmsICCViewingConditions to make differences evident. Unfortunately, the tag cannot deal with surround La, Yb and D value so is basically useless to store CAM02 viewing conditions.

Source

pub fn forward(&mut self, input: &CIEXYZ) -> JCh

Evaluates the CAM02 model in the forward direction

Source

pub fn reverse(&mut self, input: &JCh) -> CIEXYZ

Evaluates the CAM02 model in the reverse direction

Trait Implementations§

Source§

impl Drop for CIECAM02

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> 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, 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.