Enum image_canvas::layout::Block
source · [−]#[non_exhaustive]
#[repr(u8)]
pub enum Block {
Pixel,
Sub1x2,
Sub1x4,
Sub2x2,
Sub2x4,
Sub4x4,
Pack1x2,
Pack1x4,
Pack1x8,
Yuv422,
Yuy2,
Yuv411,
}
Expand description
How many pixels are described by a single texel unit.
Also each pixel in a block to order of channels, i.e. provides the link between SampleParts and SampleBits. Note that some block layouts may have less channel than the sample if channels are not encoded separately, for example block compressed layouts.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Pixel
Each texel is a single pixel.
Sub1x2
Each texel refers to two pixels across width.
Sub1x4
Each texel refers to four pixels across width.
Sub2x2
Each texel refers to a two-by-two block.
Sub2x4
Each texel refers to a two-by-four block.
Sub4x4
Each texel refers to a four-by-four block.
Pack1x2
Each texel contains channels for two pixels, consecutively.
Pack1x4
Each texel contains channels for four pixels, consecutively.
Pack1x8
Each texel contains channels for eight pixels, consecutively.
Yuv422
Yuy2
Yuv422 with different order of channels.
Yuv411
Implementations
Trait Implementations
impl Copy for Block
impl Eq for Block
impl StructuralEq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more