Struct CodingIndependentCodePoints

pub struct CodingIndependentCodePoints { pub color_primaries: u8, pub transfer_function: u8, pub matrix_coefficients: u8, pub is_video_full_range_image: bool }

Coding-independent code points (cICP) specify the color space (primaries), transfer function, matrix coefficients and scaling factor of the image using the code points specified in ITU-T-H.273.

See https://www.w3.org/TR/png-3/#cICP-chunk for more details.

Fields

color_primaries: u8

Id number of the color primaries defined in ITU-T-H.273 in "Table 2 - Interpretation of colour primaries (ColourPrimaries) value".

transfer_function: u8

Id number of the transfer characteristics defined in ITU-T-H.273 in "Table 3 - Interpretation of transfer characteristics (TransferCharacteristics) value".

matrix_coefficients: u8

Id number of the matrix coefficients defined in ITU-T-H.273 in "Table 4 - Interpretation of matrix coefficients (MatrixCoefficients) value".

This field is included to faithfully replicate the base ITU-T-H.273 specification, but matrix coefficients will always be set to 0, because RGB is currently the only supported color mode in PNG.

is_video_full_range_image: bool

Whether the image is a full range image or a narrow range image.

This field is included to faithfully replicate the base ITU-T-H.273 specification, but it has limited practical application to PNG images, because narrow-range images are quite rare in practice.

Trait Implementations

impl Clone for CodingIndependentCodePoints

fn clone(&self) -> Self

impl Copy for CodingIndependentCodePoints

impl Debug for CodingIndependentCodePoints

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

impl Eq for CodingIndependentCodePoints

impl PartialEq for CodingIndependentCodePoints

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

impl StructuralPartialEq for CodingIndependentCodePoints

Auto Trait Implementations

impl Freeze for CodingIndependentCodePoints

impl RefUnwindSafe for CodingIndependentCodePoints

impl Send for CodingIndependentCodePoints

impl Sync for CodingIndependentCodePoints

impl Unpin for CodingIndependentCodePoints

impl UnsafeUnpin for CodingIndependentCodePoints

impl UnwindSafe for CodingIndependentCodePoints

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for CodingIndependentCodePoints

fn from(t: T) -> T

Returns the argument unchanged.

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

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

impl<T, U> Into<U> for CodingIndependentCodePoints 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 CodingIndependentCodePoints where U: Into<T>,

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

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

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