#[non_exhaustive]pub enum Subsampling {
None,
Horizontal,
Both,
}Expand description
How much the chroma channels are subsampled relative to luma.
Chroma carries far less perceptible detail than luma, so discarding three quarters of it is nearly free visually and saves a substantial fraction of the bytes. It is not free for synthetic images with hard colour edges, which is why it can be turned off.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
4:4:4 — full-resolution chroma.
Horizontal
4:2:2 — chroma at half width.
Both
4:2:0 — chroma at half width and half height.
Trait Implementations§
Source§impl Clone for Subsampling
impl Clone for Subsampling
Source§fn clone(&self) -> Subsampling
fn clone(&self) -> Subsampling
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 Subsampling
Source§impl Debug for Subsampling
impl Debug for Subsampling
Source§impl Default for Subsampling
impl Default for Subsampling
Source§fn default() -> Subsampling
fn default() -> Subsampling
Returns the “default value” for a type. Read more
impl Eq for Subsampling
Source§impl PartialEq for Subsampling
impl PartialEq for Subsampling
impl StructuralPartialEq for Subsampling
Auto Trait Implementations§
impl Freeze for Subsampling
impl RefUnwindSafe for Subsampling
impl Send for Subsampling
impl Sync for Subsampling
impl Unpin for Subsampling
impl UnsafeUnpin for Subsampling
impl UnwindSafe for Subsampling
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