Struct CicpTransform
pub struct CicpTransform { /* private fields */ }
Apply to colors of the input color space to get output color values.
We do not support all possible Cicp color spaces, but when we support one then all builtin
Pixel types can be converted with their respective components. This value is used to signify
that some particular combination is supported.
Implementations
impl CicpTransform
fn new(from: Cicp, into: Cicp) -> Option<Self>Construct a transform between two color spaces.
Returns
Someif the transform is guaranteed to be supported byimage. Both color spaces are well understood and can be expected to be supported in future versions. However, we do not make guarantees about adjusting the rounding modes, accuracy, and exact numeric values used in the transform. Also, out-of-gamut colors may be handled differently per API.Returns
Noneif the transformation is not (yet) supported.This is used with [
ConvertColorOptions]crate::ConvertColorOptionsin [ImageBuffer::copy_from_color_space]crate::ImageBuffer::copy_from_color_space, [DynamicImage::copy_from_color_space]DynamicImage::copy_from_color_space.
Trait Implementations
impl Clone for CicpTransform
fn clone(&self) -> CicpTransform
Auto Trait Implementations
impl !RefUnwindSafe for CicpTransform
impl !UnwindSafe for CicpTransform
impl Freeze for CicpTransform
impl Send for CicpTransform
impl Sync for CicpTransform
impl Unpin for CicpTransform
impl UnsafeUnpin for CicpTransform
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for CicpTransform
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for CicpTransform
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for CicpTransform
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for CicpTransform
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for CicpTransform
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for CicpTransform
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for CicpTransform
fn from(t: T) -> TReturns the argument unchanged.
impl<T> IntoEither for CicpTransform
impl<T> Pointable for CicpTransform
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for CicpTransform
where
T: ?Sized,
impl<T> ToOwned for CicpTransform
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for CicpTransform
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for CicpTransform
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for CicpTransform
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>