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() -> ColorEncoding
pub const fn srgb_linear() -> ColorEncoding
sRGB primaries + D65 + linear transfer + relative intent.
This is what the previous monolithic encode_file wrote.
Sourcepub const fn srgb() -> ColorEncoding
pub const fn srgb() -> ColorEncoding
Standard sRGB (sRGB primaries + D65 + sRGB transfer).
Sourcepub const fn display_p3() -> ColorEncoding
pub const fn display_p3() -> ColorEncoding
Display P3 (P3 primaries + D65 + sRGB transfer).
Sourcepub const fn bt2020_pq() -> ColorEncoding
pub const fn bt2020_pq() -> ColorEncoding
Rec. 2020 / BT.2020 with PQ transfer (HDR10-style).
Sourcepub const fn bt2020_hlg() -> ColorEncoding
pub const fn bt2020_hlg() -> ColorEncoding
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
Source§impl Default for ColorEncoding
impl Default for ColorEncoding
Source§fn default() -> ColorEncoding
fn default() -> ColorEncoding
Returns the “default value” for a type. Read more
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