Skip to main content

OutputSignaling

Enum OutputSignaling 

Source
#[non_exhaustive]
pub enum OutputSignaling { Auto, PreserveOrigin, CicpOnly, IccOnly, CicpAndIcc, ExplicitIcc(Arc<[u8]>), Strip, }
Expand description

Requested container color signaling for an encoder (CICP / ICC metadata emission).

Selects container signaling metadata, not the target pixel color space (which is determined by the destination PixelFormat).

ModeCICP emittedICC emittedBehavior on non-CICP / display-HLG / mismatch
Auto (default)Standardized RGB CICP when availableCompanion ICC on non-sRGB full-range RGB when available; ICC-only for Adobe RGB, non-sRGB Gray, ColorSpace::Icc, Cmyk(Some); (None, None) for sRGB Gray and untagged CMYKRefuses HlgMode::Display (no standard CICP/ICC)
PreserveOriginOrigin CICP if compatibleOrigin ICC if compatibleErrors if destination color semantics differ from origin
CicpOnlyExplicit CICPNoneErrors if destination has no standard CICP (e.g. Adobe RGB, Gray, custom ICC, display-HLG)
IccOnlyNoneSynthesized / bundled / embedded ICCErrors if no ICC profile is available (e.g. default sRGB without explicit ICC, narrow range, HLG, XYZ)
CicpAndIccExplicit CICPSynthesized / bundled ICCErrors unless both standard CICP and a matching ICC profile are available
ExplicitIcc(bytes)NoneExact caller bytesValidates ICC structure and destination color/transform compatibility
StripNoneNoneEmits no tags without modifying pixels

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Auto

Automatic container signaling: emits CICP for standardized RGB (plus a companion ICC on non-sRGB full-range RGB when available), ICC-only for Adobe RGB / non-sRGB Gray / active ColorSpace::Icc / ColorSpace::Cmyk(Some), and (None, None) for full-range sRGB Gray and untagged CMYK.

§

PreserveOrigin

Preserve the original file’s ColorOrigin signaling when compatible with dst.

§

CicpOnly

Emit explicit CICP codes only (cicp = Some, icc = None).

§

IccOnly

Emit an ICC profile only (cicp = None, icc = Some).

§

CicpAndIcc

Require and emit both explicit CICP codes and a matching ICC profile (cicp = Some, icc = Some).

§

ExplicitIcc(Arc<[u8]>)

Embed an explicit caller-provided ICC profile (cicp = None, icc = Some) after verifying destination compatibility.

§

Strip

Strip color metadata (cicp = None, icc = None; does not alter pixel values).

Trait Implementations§

Source§

impl Clone for OutputSignaling

Source§

fn clone(&self) -> OutputSignaling

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OutputSignaling

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for OutputSignaling

Source§

fn default() -> OutputSignaling

Returns the “default value” for a type. Read more
Source§

impl Eq for OutputSignaling

Source§

impl PartialEq for OutputSignaling

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OutputSignaling

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> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.