Trait exr::image::write::channels::GetPixel[][src]

pub trait GetPixel: Sync {
    type Pixel;
    fn get_pixel(&self, position: Vec2<usize>) -> Self::Pixel;
}
Expand description

Define how to get a pixel from your custom pixel storage. Can be a closure of type [Sync + Fn(Vec2<usize>) -> YourPixel].

Associated Types

type Pixel[src]

The pixel tuple containing f32, f16, u32 and Sample values. The length of the tuple must match the number of channels in the image.

Required methods

fn get_pixel(&self, position: Vec2<usize>) -> Self::Pixel[src]

Inspect a single pixel at the requested position. Will be called exactly once for each pixel in the image. The position will not exceed the image dimensions. Might be called from multiple threads at the same time.

Implementors

impl<F, P> GetPixel for F where
    F: Sync + Fn(Vec2<usize>) -> P, 
[src]

type Pixel = P

fn get_pixel(&self, position: Vec2<usize>) -> P[src]

impl<Px> GetPixel for PixelVec<Px> where
    Px: Clone + Sync
[src]

type Pixel = Px

fn get_pixel(&self, position: Vec2<usize>) -> Self::Pixel[src]