Bitmap.Bitmap
Bitmap(string)
Initializes a new instance of the Bitmap
class from the specified file.
public Bitmap(string filename)
Parameter | Type | Description |
---|
filename | String | The 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)
Parameter | Type | Description |
---|
filename | String | The name of the bitmap file. |
useIcm | Boolean | true 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)
Parameter | Type | Description |
---|
stream | Stream | The data stream used to load the image. |
Exceptions
exception | condition |
---|
ArgumentException | stream does not contain image data or is null.-or-stream contains a PNG image file with a single dimension greater than 65,535 pixels. |
See Also
Bitmap(Stream, bool)
Initializes a new instance of the Bitmap
class from the specified data stream.
public Bitmap(Stream stream, bool useIcm)
Parameter | Type | Description |
---|
stream | Stream | The data stream used to load the image. |
useIcm | Boolean | true to use color correction for this Bitmap ; otherwise, false. |
Exceptions
exception | condition |
---|
ArgumentException | stream does not contain image data or is null.-or-stream contains a PNG image file with a single dimension greater than 65,535 pixels. |
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)
Parameter | Type | Description |
---|
width | Int32 | The width, in pixels, of the new Bitmap . |
height | Int32 | The height, in pixels, of the new Bitmap . |
format | PixelFormat | The PixelFormat enumeration for the new Bitmap . |
See Also
Bitmap(int, int)
Initializes a new instance of the Bitmap
class with the specified size.
public Bitmap(int width, int height)
Parameter | Type | Description |
---|
width | Int32 | The width, in pixels, of the new Bitmap . |
height | Int32 | The height, in pixels, of the new Bitmap . |
Exceptions
exception | condition |
---|
Exception | The operation failed. |
See Also
Bitmap(Bitmap)
Initializes a new instance of the Bitmap
class from the specified existing image.
public Bitmap(Bitmap original)
Parameter | Type | Description |
---|
original | Bitmap | The Image from which to create the new Bitmap . |
See Also
Bitmap(Bitmap, int, int)
Initializes a new instance of the Bitmap
class from the specified existing image, scaled to the specified size.
public Bitmap(Bitmap original, int width, int height)
Parameter | Type | Description |
---|
original | Bitmap | The Image from which to create the new Bitmap . |
width | Int32 | The width, in pixels, of the new Bitmap . |
height | Int32 | The height, in pixels, of the new Bitmap . |
Exceptions
exception | condition |
---|
Exception | The operation failed. |
See Also
Bitmap(Bitmap, Size)
Initializes a new instance of the Bitmap
class from the specified existing image, scaled to the specified size.
public Bitmap(Bitmap original, Size newSize)
Parameter | Type | Description |
---|
original | Bitmap | The Image from which to create the new Bitmap . |
newSize | Size | The Size structure that represent the size of the new Bitmap . |
Exceptions
exception | condition |
---|
Exception | The operation failed. |
See Also