pub enum Gamut {
Srgb,
DisplayP3,
AdobeRgb,
Bt2020,
ProPhotoRgb,
}Expand description
The source colour space an Lqip::encode call is told to interpret its pixels in.
A deliberate mirror of [chromahash::Gamut] rather than a re-export: this is a public
Capsule type that crosses the FFI and the wasm boundary, so a pre-1.0 dependency must not be
able to reshape it. The mapping is exhaustive in both directions and From keeps it
compile-checked.
The gamut is an encode-side input only. The sidecar stores the payload, the format version and the fallback colour — it does not store the gamut, and chromahash does not carry it in the payload either. Once encoded, the source gamut is not recoverable from the sidecar; the decode side always renders to sRGB.
Variants§
Srgb
sRGB / Rec. 709 primaries — the default and the only safe assumption for an untagged source.
DisplayP3
Display P3 (DCI-P3 primaries, sRGB transfer) — the common wide-gamut capture space.
AdobeRgb
Adobe RGB (1998).
Bt2020
ITU-R BT.2020 — the ultra-wide gamut used by HDR sources.
ProPhotoRgb
ProPhoto RGB (ROMM RGB) — the widest of the raw-editing spaces.
Trait Implementations§
impl Copy for Gamut
impl Eq for Gamut
impl StructuralPartialEq for Gamut
Auto Trait Implementations§
impl Freeze for Gamut
impl RefUnwindSafe for Gamut
impl Send for Gamut
impl Sync for Gamut
impl Unpin for Gamut
impl UnsafeUnpin for Gamut
impl UnwindSafe for Gamut
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more