Bitmap.Bitmap

Bitmap(int, int)

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

public Bitmap(int width, int height)
ParameterTypeDescription
widthInt32The width, in pixels, of the new Bitmap.
heightInt32The height, in pixels, of the new Bitmap.

Remarks

The only supported internal bitmap format at the moment is equivalent to PixelFormat.Format32bppPArgb.

See Also


Bitmap(string)

Initializes a new instance of the Bitmap class from the specified file.

public Bitmap(string filename)
ParameterTypeDescription
filenameStringThe name of the bitmap file.

See Also


Bitmap(string, bool)

Initializes a new instance of the Bitmap class from the specified file.

public Bitmap(string filename, bool useIcm)
ParameterTypeDescription
filenameStringThe name of the bitmap file.
useIcmBooleantrue to use color correction for this Bitmap; otherwise, false.

See Also


Bitmap(Stream)

Initializes a new instance of the Bitmap class from the specified data stream.

public Bitmap(Stream stream)
ParameterTypeDescription
streamStreamThe data stream used to load the image.

See Also


Bitmap(Stream, bool)

Initializes a new instance of the Bitmap class from the specified data stream.

public Bitmap(Stream stream, bool useIcm)
ParameterTypeDescription
streamStreamThe data stream used to load the image.
useIcmBooleantrue to use color correction for this Bitmap; otherwise, false.

See Also


Bitmap(int, int, PixelFormat)

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

public Bitmap(int width, int height, PixelFormat format)
ParameterTypeDescription
widthInt32The width, in pixels, of the new Bitmap.
heightInt32The height, in pixels, of the new Bitmap.
formatPixelFormatThe PixelFormat enumeration for the new Bitmap.

See Also


Bitmap(int, int, int, PixelFormat, int[])

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

public Bitmap(int width, int height, int stride, PixelFormat format, int[] data)
ParameterTypeDescription
widthInt32The width, in pixels, of the new Bitmap.
heightInt32The height, in pixels, of the new Bitmap.
strideInt32The byte offset between the beginning of one scan line and the next, must be a multiple of four.
formatPixelFormatThe PixelFormat enumeration for the new Bitmap.
dataInt32[]The pixel data.

See Also


Bitmap(Image)

Initializes a new instance of the Bitmap class from the specified existing image.

public Bitmap(Image original)
ParameterTypeDescription
originalImageThe Image from which to create the new Bitmap.

See Also


Bitmap(Image, Size)

Initializes a new instance of the Bitmap class from the specified existing image, scaled to the specified size.

public Bitmap(Image original, Size newSize)
ParameterTypeDescription
originalImageThe Image from which to create the new Bitmap
newSizeSizeThe Size structure that represent the size of the new Bitmap.

See Also


Bitmap(Image, int, int)

Initializes a new instance of the Bitmap class from the specified existing image, scaled to the specified size.

public Bitmap(Image original, int width, int height)
ParameterTypeDescription
originalImageThe Image from which to create the new Bitmap.
widthInt32The width, in pixels, of the new Bitmap.
heightInt32The height, in pixels, of the new Bitmap.

See Also