Trait image::PixelWithColorType

source ·
pub trait PixelWithColorType: Pixel + SealedPixelWithColorType {
    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.

Object Safety§

This trait is not object safe.

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