#[non_exhaustive]pub enum IccRetention {
Drop,
KeepNonSrgb,
Keep,
DropIfCicpRepresentable,
DropIfCicpSafeSoleCarrier,
}Expand description
How to treat the ICC profile when filtering Metadata.
#[non_exhaustive]: ICC handling can gain dispositions (e.g. a future
convert-to-sRGB or keep-if-display-referred mode) without a breaking
change. Match with a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Drop
Always drop the profile.
KeepNonSrgb
Keep the profile unless it is a redundant sRGB profile — the common choice (sRGB is the assumed default, so embedding it is pure weight).
Keep
Keep the profile as-is, even a redundant sRGB one (byte-faithful).
DropIfCicpRepresentable
Drop the profile when it maps to a CICP expressible as code points
(sRGB / Display-P3 / BT.2020 / BT.2100…) — i.e. CICP fully describes the
color. Target-aware: only takes effect in
color::resolve_color_emit, where the
target’s CICP carrier is known. In the target-blind Metadata::filtered
path it conservatively keeps the profile.
DropIfCicpSafeSoleCarrier
Drop the profile only when the target format’s CICP is safe as the sole
color carrier (EncodeCapabilities::cicp_safe_sole_carrier
— JXL today) and CICP represents the color. Like
DropIfCicpRepresentable, this is
target-aware and keeps the profile in Metadata::filtered.
Trait Implementations§
Source§impl Clone for IccRetention
impl Clone for IccRetention
Source§fn clone(&self) -> IccRetention
fn clone(&self) -> IccRetention
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more