Enum afi::ColorChannels[][src]

#[repr(u8)]
pub enum ColorChannels { Grayscale, Rgb, Rgba, Bgr, Bgra, YCbCr, }

The format for the color channels of the Video.

Variants

Grayscale color format, 1 channel (stored in red channel).

RGB color format, 3 channels.

RGBA color format, 4 channels.

BGR color format, 3 channels.

BGRA color format, 4 channels.

YCbCr color format, 3 channels

Methods

impl ColorChannels
[src]

Convert a pixel to this format from another.

Pack an RGBA [u8; 4] into an RGBA u32

Unpack an RGBA u32 into an RGBA [u8; 4]

Return the number of channels.

Trait Implementations

impl Copy for ColorChannels
[src]

impl Clone for ColorChannels
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for ColorChannels
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for ColorChannels
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations