pub struct ColorEncoding {
pub white_point: WhitePoint,
pub primaries: Primaries,
pub transfer: TransferFunction,
pub rendering_intent: RenderingIntent,
}Expand description
CICP-style color encoding: which primaries + transfer + rendering intent the original image was authored in. The white point is fixed by the primaries for the named enumerants (e.g. sRGB primaries imply D65), but JXL still carries it as a separate field, so we expose it.
Fields§
§white_point: WhitePoint§primaries: Primaries§transfer: TransferFunction§rendering_intent: RenderingIntentImplementations§
Source§impl ColorEncoding
impl ColorEncoding
Sourcepub const fn srgb_linear() -> Self
pub const fn srgb_linear() -> Self
sRGB primaries + D65 + linear transfer + relative intent.
This is what the previous monolithic encode_file wrote.
Sourcepub const fn display_p3() -> Self
pub const fn display_p3() -> Self
Display P3 (P3 primaries + D65 + sRGB transfer).
Sourcepub const fn bt2020_hlg() -> Self
pub const fn bt2020_hlg() -> Self
Rec. 2020 / BT.2020 with HLG transfer (broadcast HDR / HLG10-style).
Trait Implementations§
Source§impl Clone for ColorEncoding
impl Clone for ColorEncoding
Source§fn clone(&self) -> ColorEncoding
fn clone(&self) -> ColorEncoding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ColorEncoding
Source§impl Debug for ColorEncoding
impl Debug for ColorEncoding
Auto Trait Implementations§
impl Freeze for ColorEncoding
impl RefUnwindSafe for ColorEncoding
impl Send for ColorEncoding
impl Sync for ColorEncoding
impl Unpin for ColorEncoding
impl UnsafeUnpin for ColorEncoding
impl UnwindSafe for ColorEncoding
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
Mutably borrows from an owned value. Read more