Skip to main content

PixelWithColorType

Trait PixelWithColorType 

Source
pub trait PixelWithColorType: Pixel + SealedPixelWithColorType<TransformableSubpixel = <Self as Pixel>::Subpixel> {
    const COLOR_TYPE: ExtendedColorType;
}
Expand description

The pixel with an associated ColorType. Not all possible pixels represent one of the predefined ColorTypes.

Required Associated Constants§

Source

const COLOR_TYPE: ExtendedColorType

This pixel has the format of one of the predefined ColorTypes, such as Rgb8, La16 or Rgba32F. This is needed for automatically detecting a color format when saving an image as a file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl PixelWithColorType for Luma<u8>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::L8

Source§

impl PixelWithColorType for Luma<u16>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::L16

Source§

impl PixelWithColorType for LumaA<u8>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::La8

Source§

impl PixelWithColorType for LumaA<u16>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::La16

Source§

impl PixelWithColorType for Rgb<f32>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::Rgb32F

Source§

impl PixelWithColorType for Rgb<u8>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::Rgb8

Source§

impl PixelWithColorType for Rgb<u16>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::Rgb16

Source§

impl PixelWithColorType for Rgba<f32>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::Rgba32F

Source§

impl PixelWithColorType for Rgba<u8>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::Rgba8

Source§

impl PixelWithColorType for Rgba<u16>

Source§

const COLOR_TYPE: ExtendedColorType = ExtendedColorType::Rgba16