src/Foundation/Media/Gimela.Media.Imaging/Helpers/ImageHelper.cs
/// <summary>
/// Create and initialize new 8 bpp grayscale image.
/// </summary>
/// 
/// <param name="width">Image width.</param>
/// <param name="height">Image height.</param>
/// 
/// <returns>Returns the created grayscale image.</returns>
/// 
/// <remarks>The method creates new 8 bpp grayscale image and initializes its palette.
/// Grayscale image is represented as
/// <see cref="System.Drawing.Imaging.PixelFormat">Format8bppIndexed</see>
/// image with palette initialized to 256 gradients of gray color.</remarks>
/// 
Create and initialize new 8 bpp grayscale image.
Create and initialize new 8 bpp grayscale image .
public static Bitmap CreateGrayscaleImage(int width, int height)
    {
      Bitmap image = new Bitmap(width, height, PixelFormat.Format8bppIndexed);
      SetGrayscalePalette(image);
      return image;
    }
public static Bitmap CreateGrayscaleImage ( int width , int height ) { Bitmap image = new Bitmap ( width , height , PixelFormat . Format8bppIndexed ) ; SetGrayscalePalette ( image ) ; return image ; }
Create and initialize new 8 bpp grayscale image.
Create and initialize new 8 bpp grayscale image .
// create new image // set palette to grayscale // return new image
Returns the created grayscale image.
Returns the created grayscale image .
width
int
None
height
int
None
remarks
The method creates new 8 bpp grayscale image and initializes its palette.
Grayscale image is represented as
Format8bppIndexed
The method creates new 8 bpp grayscale image and initializes its palette . Grayscale image is represented as Format8bppIndexed