Struct Cicp

pub struct Cicp { pub primaries: CicpColorPrimaries, pub transfer: CicpTransferCharacteristics, pub matrix: CicpMatrixCoefficients, pub full_range: CicpVideoFullRangeFlag }

Reference: https://www.itu.int/rec/T-REC-H.273-202407-I/en (V4)

Fields

primaries: CicpColorPrimaries

Defines the exact color of red, green, blue primary colors.

transfer: CicpTransferCharacteristics

The electro-optical transfer function (EOTF) that maps color components to linear values.

matrix: CicpMatrixCoefficients

A matrix between linear values and primary color representation.

For an RGB space this is the identity matrix.

full_range: CicpVideoFullRangeFlag

Whether the color components use all bits of the encoded values, or have headroom.

For compute purposes, image only supports CicpVideoFullRangeFlag::FullRange and you get errors when trying to pass a non-full-range color profile to transform APIs such as DynamicImage::apply_color_space or CicpTransform::new.

Implementations

impl Cicp

const SRGB: Self = _;

The sRGB color space, BT.709 transfer function and D65 whitepoint.

const SRGB_LINEAR: Self = _;

SRGB primaries and whitepoint with linear samples.

const DISPLAY_P3: Self = _;

The Display-P3 color space, a wide-gamut choice with SMPTE RP 432-2 primaries.

Note that this modern Display P3 uses a D65 whitepoint. Use the primaries SmpteRp431 for the previous standard. The advantage of the new standard is the color system shares its whitepoint with sRGB and BT.2020.

Trait Implementations

impl Clone for Cicp

fn clone(&self) -> Cicp

impl Copy for Cicp

impl Debug for Cicp

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for Cicp

impl Hash for Cicp

fn hash<__H: Hasher>(&self, state: &mut __H)

impl PartialEq for Cicp

fn eq(&self, other: &Cicp) -> bool

impl StructuralPartialEq for Cicp

Auto Trait Implementations

impl Freeze for Cicp

impl RefUnwindSafe for Cicp

impl Send for Cicp

impl Sync for Cicp

impl Unpin for Cicp

impl UnsafeUnpin for Cicp

impl UnwindSafe for Cicp

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Cicp where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Cicp where ST: ?Sized, DT: ?Sized,

impl<T> Any for Cicp where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Cicp where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Cicp where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Cicp where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Cicp

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for Cicp

impl<T> Pointable for Cicp

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> Read<Exclusive, BecauseExclusive> for Cicp where T: ?Sized,

impl<T> ToOwned for Cicp where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Cicp where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Cicp where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Cicp where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>