[][src]Trait image2::Pixel

pub trait Pixel<'a, T: Type, C: Color>: AsRef<[T]> {
    fn to_vec(&self) -> Vec<T> { ... }
fn to_f(&self) -> Vec<f64> { ... }
fn to_pixel_vec(&self) -> PixelVec<T> { ... }
fn to_pixel_vec_f(&self) -> PixelVec<f64> { ... }
fn is_true(&self) -> bool { ... }
fn is_false(&self) -> bool { ... }
fn map<F: FnMut(&T) -> T>(&self, f: F) -> PixelVec<T> { ... }
fn iter(&self) -> Iter<T> { ... }
fn to_rgb(&self) -> LinSrgb { ... }
fn from_rgb(px: Rgb) -> PixelVec<f64> { ... }
fn to_rgba(&self) -> LinSrgba { ... }
fn from_rgba(px: Rgba) -> PixelVec<f64> { ... }
fn to_luma(&self) -> LinLuma { ... }
fn from_luma(px: Luma) -> PixelVec<f64> { ... }
fn to_hsv(&self) -> Hsv { ... }
fn from_hsv(px: Hsv) -> PixelVec<f64> { ... }
fn to_lab(&self) -> Lab { ... }
fn from_lab(px: Lab) -> PixelVec<f64> { ... } }

Pixel is used to access chunks of image data

Provided methods

fn to_vec(&self) -> Vec<T>

Create a new Vec from existing pixel data

fn to_f(&self) -> Vec<f64>

Create a new Vec of normalized values from existing pixel data

fn to_pixel_vec(&self) -> PixelVec<T>

Create a new PixelVec from existing pixel data

fn to_pixel_vec_f(&self) -> PixelVec<f64>

Create a new PixelVec of normalized values from existing pixel data

fn is_true(&self) -> bool

Returns true when every value is > 0

fn is_false(&self) -> bool

Returns true when every value == 0

fn map<F: FnMut(&T) -> T>(&self, f: F) -> PixelVec<T>

Create a new PixelVec by executing f for each channel

fn iter(&self) -> Iter<T>

fn to_rgb(&self) -> LinSrgb

fn from_rgb(px: Rgb) -> PixelVec<f64>

fn to_rgba(&self) -> LinSrgba

fn from_rgba(px: Rgba) -> PixelVec<f64>

fn to_luma(&self) -> LinLuma

fn from_luma(px: Luma) -> PixelVec<f64>

fn to_hsv(&self) -> Hsv

fn from_hsv(px: Hsv) -> PixelVec<f64>

fn to_lab(&self) -> Lab

fn from_lab(px: Lab) -> PixelVec<f64>

Loading content...

Implementations on Foreign Types

impl<'a, T: Type, C: Color> Pixel<'a, T, C> for &'a [T][src]

impl<'a, T: Type, C: Color> Pixel<'a, T, C> for &'a mut [T][src]

impl<'a, T: Type, C: Color> Pixel<'a, T, C> for Vec<T>[src]

impl<'a, T: Type, C: Color> Pixel<'a, T, C> for &'a Vec<T>[src]

impl<'a, T: Type, C: Color> Pixel<'a, T, C> for &'a mut Vec<T>[src]

Loading content...

Implementors

impl<'a, T: Type, C: Color> Pixel<'a, T, C> for PixelVec<T>[src]

Loading content...