Bitmap Constructor (Int32, Int32, PixelFormat, Color, ColorPalette)

Initializes a new instance of the Bitmap class with the specified size, pixel format, background color, and palette.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public Bitmap(
	int width,
	int height,
	PixelFormat format,
	Color color,
	ColorPalette palette
)

Parameters

width

Type: System..Int32

The width, in pixels, of the new Bitmap.
height

Type: System..Int32

The height, in pixels, of the new Bitmap.
format

Type: Aurigma.GraphicsMill..PixelFormat

The pixel format for the new Bitmap. If you specify indexed pixel format, uninitialized palette will be generated. You must fill entries by yourself. Palette will have maximum possible for given pixel format colors number (2 colors for 1-bit images, 16 colors for 4-bit images, and 256 colors for 8-bit images).
color

Type: Aurigma.GraphicsMill..Color

The background color for the new Bitmap.
palette

Type: Aurigma.GraphicsMill..ColorPalette

The palette attached to the new Bitmap. Note, this palette object is binded to bitmap, not copied. It means that if you later change anything in this palette object, changes will be reflected in the palette of bitmap.

Remarks

If color space of the color does not fit color space of the pixel format, color is converted to necessary color space.

See Also

Reference