[][src]Trait image2::filter::Filter

pub trait Filter: Sized + Sync {
    fn compute_at<T: Type, C: Color, I: Image<T, C>>(
        &self,
        x: usize,
        y: usize,
        c: usize,
        input: &[&I]
    ) -> f64; fn eval_partial<T: Type, C: Color, U: Type, D: Color, I: Image<T, C>, J: Image<U, D>>(
        &self,
        start_x: usize,
        start_y: usize,
        width: usize,
        height: usize,
        output: &mut I,
        input: &[&J]
    ) { ... }
fn eval<T: Send + Type, C: Color, U: Type, D: Color, I: Sync + Send + Image<T, C>, J: Sync + Image<U, D>>(
        &self,
        output: &mut I,
        input: &[&J]
    ) { ... }
fn eval_in_place<T: Send + Type, C: Color, I: Sync + Send + Image<T, C>>(
        &self,
        image: &mut I
    ) { ... }
fn join<A: Filter, F: Fn(f64, f64) -> f64>(
        &self,
        other: A,
        f: F
    ) -> Join<Self, A, F> { ... }
fn and_then<F: Fn(f64) -> f64>(&self, f: F) -> AndThen<Self, F> { ... } }

Filters are used to manipulate images in a generic, composable manner

Required methods

fn compute_at<T: Type, C: Color, I: Image<T, C>>(
    &self,
    x: usize,
    y: usize,
    c: usize,
    input: &[&I]
) -> f64

Loading content...

Provided methods

fn eval_partial<T: Type, C: Color, U: Type, D: Color, I: Image<T, C>, J: Image<U, D>>(
    &self,
    start_x: usize,
    start_y: usize,
    width: usize,
    height: usize,
    output: &mut I,
    input: &[&J]
)

Evaluate a filter on part of an image

fn eval<T: Send + Type, C: Color, U: Type, D: Color, I: Sync + Send + Image<T, C>, J: Sync + Image<U, D>>(
    &self,
    output: &mut I,
    input: &[&J]
)

Evaluate filter in parallel

fn eval_in_place<T: Send + Type, C: Color, I: Sync + Send + Image<T, C>>(
    &self,
    image: &mut I
)

Evaluate filter in parallel in place

fn join<A: Filter, F: Fn(f64, f64) -> f64>(
    &self,
    other: A,
    f: F
) -> Join<Self, A, F>

fn and_then<F: Fn(f64) -> f64>(&self, f: F) -> AndThen<Self, F>

Loading content...

Implementors

impl Filter for image2::filter::Add[src]

impl Filter for AlphaBlend[src]

impl Filter for Blend[src]

impl Filter for Gamma[src]

impl Filter for Invert[src]

impl Filter for Multiply[src]

impl Filter for SwapChannel[src]

impl Filter for ToColor[src]

impl Filter for ToGrayscale[src]

impl Filter for image2::kernel::Add[src]

impl Filter for Div[src]

impl Filter for Kernel[src]

impl Filter for Mul[src]

impl Filter for Rem[src]

impl Filter for Sub[src]

impl Filter for Transform[src]

impl<'a, A: Filter, B: Filter, F: Sync + Fn(f64, f64) -> f64> Filter for Join<'a, A, B, F>[src]

impl<'a, A: Filter, F: Sync + Fn(f64) -> f64> Filter for AndThen<'a, A, F>[src]

Loading content...