pub trait PixelFormat {
    type InputPixel: Copy;
    type OutputPixel;
    type Accumulator: Copy;

    fn new() -> Self::Accumulator;
    fn add(
        &self,
        acc: &mut Self::Accumulator,
        inp: Self::InputPixel,
        coeff: f32
    ); fn add_acc(acc: &mut Self::Accumulator, inp: Self::Accumulator, coeff: f32); fn into_pixel(&self, acc: Self::Accumulator) -> Self::OutputPixel; }
Expand description

Use Pixel presets to specify pixel format.

The trait represents a temporary object that adds pixels together.

Required Associated Types

Pixel type in the source image

Pixel type in the destination image (usually the same as Input)

Temporary struct for the pixel in floating-point

Required Methods

Create new floating-point pixel

Add new pixel with a given weight (first axis)

Add bunch of accumulated pixels with a weight (second axis)

Finalize, convert to output pixel format

Implementors