[]
        
(Showing Draft Content)

C1.Framework.Drawing.Gdi.Bitmap.-ctor

Bitmap Constructor

Bitmap(int, int)

Initializes a new instance of the Bitmap class with the specified size.

Declaration
public Bitmap(int width, int height)
Parameters
Type Name Description
int width

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

int height

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

Bitmap(int, int, BitsPerPixel)

Intializes a new instance of the Bitmap class with the specified size color format (color planes and bits-per-pixel).

Declaration
public Bitmap(int width, int height, BitsPerPixel bitsPerPixel)
Parameters
Type Name Description
int width

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

int height

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

BitsPerPixel bitsPerPixel

The number of bits required to identify the color of a single pixel.

Bitmap(int, int, int, BitsPerPixel, byte[])

Intializes a new instance of the Bitmap class with the specified size color format (color planes and bits-per-pixel).

Declaration
public Bitmap(int width, int height, int planes, BitsPerPixel bitsPerPixel, byte[] data)
Parameters
Type Name Description
int width

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

int height

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

int planes

Specifies the number of planes for the target device. This value must be set to 1.

BitsPerPixel bitsPerPixel

The number of bits required to identify the color of a single pixel.

byte[] data

The pattern data array.

Bitmap(Graphics, int, int)

Intializes a new instance of the Bitmap class with the specified Graphics object and size.

Declaration
public Bitmap(Graphics graphics, int width, int height)
Parameters
Type Name Description
Graphics graphics

A Graphics object.

int width

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

int height

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

Bitmap(Bitmap)

Initializes a new instance of the Bitmap class.

Declaration
public Bitmap(Bitmap gdiplusBitmap)
Parameters
Type Name Description
Bitmap gdiplusBitmap

A Bitmap indicates the GDI+ bitmap.

Bitmap(Bitmap, Color)

Initializes a new instance of the Bitmap class.

Declaration
public Bitmap(Bitmap gdiplusBitmap, Color backgroundColor)
Parameters
Type Name Description
Bitmap gdiplusBitmap

A Bitmap indicates the GDI+ bitmap.

Color backgroundColor

A Color structure that specifies the background color. This parameter is ignored if the bitmap is totally opaque.