Trait resize::PixelFormat [] [src]

pub trait PixelFormat: Copy {
    type Accumulator: AsRef<[f32]> + AsMut<[f32]>;
    type Subpixel: Copy + Into<f32>;
    fn new_accum() -> Self::Accumulator;
    fn into_subpixel(v: f32) -> Self::Subpixel;

    fn get_size(&self) -> usize { ... }
    fn get_ncomponents(&self) -> usize { ... }
}

See Pixel

Associated Types

Array to hold temporary values

Type of a Subpixel of each pixel (8 or 16 bits)

Required Methods

New empty Accumulator

Convert float to integer value in range appropriate for this pixel format

Provided Methods

Size of one pixel in that format in bytes.

Return number of components of that format.

Implementors