#[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).
| Mode | CICP emitted | ICC emitted | Behavior on non-CICP / display-HLG / mismatch |
|---|---|---|---|
Auto (default) | Standardized RGB CICP when available | Companion 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 CMYK | Refuses HlgMode::Display (no standard CICP/ICC) |
PreserveOrigin | Origin CICP if compatible | Origin ICC if compatible | Errors if destination color semantics differ from origin |
CicpOnly | Explicit CICP | None | Errors if destination has no standard CICP (e.g. Adobe RGB, Gray, custom ICC, display-HLG) |
IccOnly | None | Synthesized / bundled / embedded ICC | Errors if no ICC profile is available (e.g. default sRGB without explicit ICC, narrow range, HLG, XYZ) |
CicpAndIcc | Explicit CICP | Synthesized / bundled ICC | Errors unless both standard CICP and a matching ICC profile are available |
ExplicitIcc(bytes) | None | Exact caller bytes | Validates ICC structure and destination color/transform compatibility |
Strip | None | None | Emits no tags without modifying pixels |
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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
impl Clone for OutputSignaling
Source§fn clone(&self) -> OutputSignaling
fn clone(&self) -> OutputSignaling
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more