#[repr(C)]
pub enum PixelFormat {
    Argb,
    Bgra,
    Bgr,
    Rgba,
    Rgb,
    I444,
    I422,
    I420,
    Nv12,
}
Expand description

An enumeration of supported pixel formats.

Variants

Argb

RGB with alpha channel first.

32 bits per pixel

Bgra

Reverse RGB with alpha channel last.

32 bits per pixel

Bgr

Reverse RGB packed into 24 bits without padding.

24 bits per pixel

Rgba

RGB with alpha channel last.

32 bits per pixel

Rgb

RGB packed into 24 bits without padding.

24 bits per pixel

I444

YUV with one luma plane Y then 2 chroma planes U and V. Chroma planes are not sub-sampled.

24 bits per pixel

I422

YUV with one luma plane Y then 2 chroma planes U, V. Chroma planes are sub-sampled in the horizontal dimension, by a factor of 2.

16 bits per pixel

I420

YUV with one luma plane Y then U chroma plane and last the V chroma plane. The two chroma planes are sub-sampled in both the horizontal and vertical dimensions by a factor of 2.

12 bits per pixel

Nv12

YUV with one luma plane Y then one plane with U and V values interleaved. Chroma planes are subsampled in both the horizontal and vertical dimensions by a factor of 2.

12 bits per pixel

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.