fn create_image(width: u32, height: u32) -> DynamicImage {
    let img: RgbImage = ImageBuffer::from_fn(width, height, |x, _y| {
      if x % 2 == 0 {
        Rgb([0u8, 0u8, 0u8])
      } else {
        Rgb([255u8, 255u8, 255u8])
      }
    });

    DynamicImage::ImageRgb8(img)
  }
// Create an in-memory image for use in tests.
Create an in-memory image for use in tests.
Create an in - memory image for use in tests .
fn create_image(width: u32, height: u32) -> DynamicImage {
    let img: RgbImage = ImageBuffer::from_fn(width, height, |x, _y| {
      if x % 2 == 0 {
        Rgb([0u8, 0u8, 0u8])
      } else {
        Rgb([255u8, 255u8, 255u8])
      }
    });
    DynamicImage::ImageRgb8(img)
  }
fn create_image ( width : u32 , height : u32 ) -> DynamicImage { let img : RgbImage = ImageBuffer :: from_fn ( width , height , | x , _y | { if x % 2 == 0 { Rgb ( [ 0u8 , 0u8 , 0u8 ] ) } else { Rgb ( [ 255u8 , 255u8 , 255u8 ] ) } } ) ; DynamicImage :: ImageRgb8 ( img ) }
Create an in-memory image for use in tests.
Create an in - memory image for use in tests .
width
u32
height
u32
width
u32
height
u32