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
type Accumulator: AsRef<[f32]> + AsMut<[f32]>
Array to hold temporary values
type Subpixel: Copy + Into<f32>
Type of a Subpixel of each pixel (8 or 16 bits)
Required Methods
fn new_accum() -> Self::Accumulator
New empty Accumulator
fn into_subpixel(v: f32) -> Self::Subpixel
Convert float to integer value in range appropriate for this pixel format
Provided Methods
fn get_size(&self) -> usize
Size of one pixel in that format in bytes.
fn get_ncomponents(&self) -> usize
Return number of components of that format.