pub fn new(resolution: impl Into<Vec2<usize>>, pixels: Vec<Pixel>) -> Self {
        let size = resolution.into();
        assert_eq!(size.area(), pixels.len(), "expected {} samples, but vector length is {}", size.area(), pixels.len());
        Self { resolution: size, pixels }
    }
/// Create a new flattened pixel storage, checking the length of the provided pixels vector.
Create a new flattened pixel storage, checking the length of the provided pixels vector.
Create a new flattened pixel storage checking the length of the provided pixels vector .
pub fn new(resolution: impl Into<Vec2<usize>>, pixels: Vec<Pixel>) -> Self {
        let size = resolution.into();
        assert_eq!(size.area(), pixels.len(), "expected {} samples, but vector length is {}", size.area(), pixels.len());
        Self { resolution: size, pixels }
    }
pub fn new ( resolution : impl Into < Vec2 < usize > > , pixels : Vec < Pixel > ) -> Self { let size = resolution . into ( ) ; assert_eq ! ( size area ( ) pixels len ( ) " " size area ( ) pixels len ( ) ) ; Self { resolution : size , pixels } }
Create a new flattened pixel storage, checking the length of the provided pixels vector.
Create a new flattened pixel storage checking the length of the provided pixels vector .
resolution
impl Into<Vec2<usize>>
pixels
Vec<Pixel>
resolution
impl Into<Vec2<usize>>
pixels
Vec<Pixel>