pub fn new(width: u32, height: u32) -> Self {
        let img =
            ::image::RgbaImage::from_raw(width, height, vec![0u8; (width * height * 4) as usize])
                .unwrap();
        Image { img }
    }
/// Create a new image with the given dimensions, all pixels are initialized
/// to 0x00000000.
///
/// # Example
///
/// ```
/// # use riddle_image::*;
/// // Create a single pixel image
/// let img = Image::new(1,1);
/// ```
Create a new image with the given dimensions, all pixels are initialized
to 0x00000000.
Create a new image with the given dimensions all pixels are initialized to 0x00000000 .
pub fn new(width: u32, height: u32) -> Self {
        let img =
            ::image::RgbaImage::from_raw(width, height, vec![0u8; (width * height * 4) as usize])
                .unwrap();
        Image { img }
    }
pub fn new ( width : u32 , height : u32 ) -> Self { let img = :: image :: RgbaImage :: from_raw ( width , height , vec ! [ 0u8 ( width height 4 ) as usize ] ) . unwrap ( ) ; Image { img } }
Create a new image with the given dimensions, all pixels are initialized
to 0x00000000.
Create a new image with the given dimensions all pixels are initialized to 0x00000000 .
width
u32
height
u32
width
u32
height
u32
example
None
use riddle_image::*;
Create a single pixel image
let img = Image::new(1,1);
```
Create a single pixel image let img = Image :: new ( 1 1 ) ; ` ` `