cosmic::iced_winit::graphics::image::image_rs::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, ToType> ConvertBuffer<ImageBuffer<ToType, Vec<<ToType as Pixel>::Subpixel>>> for ImageBuffer<FromType, Container>
where FromType: Pixel, ToType: Pixel + FromColor<FromType>, Container: Deref<Target = [<FromType as Pixel>::Subpixel]>,