image::buffer

Trait ConvertBuffer

source
pub trait ConvertBuffer<T> {
    // Required method
    fn convert(&self) -> T;
}
Expand description

Provides color conversions for whole image buffers.

Required Methods§

source

fn convert(&self) -> T

Converts self to a buffer of type T

A generic implementation is provided to convert any image buffer to a image buffer based on a Vec<T>.

Implementors§

source§

impl<Container, FromType: Pixel, ToType> ConvertBuffer<ImageBuffer<ToType, Vec<<ToType as Pixel>::Subpixel>>> for ImageBuffer<FromType, Container>
where Container: Deref<Target = [FromType::Subpixel]>, ToType: FromColor<FromType> + Pixel,