Bitmap.Bitmap
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. |
Remarks
The only supported internal bitmap format at the moment is equivalent to PixelFormat.Format32bppPArgb
.
See Also
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
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
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
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
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
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. |
See Also
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
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 . |
See Also
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
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
- enum PixelFormat
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
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)
Parameter | Type | Description |
---|---|---|
width | Int32 | The width, in pixels, of the new Bitmap. |
height | Int32 | The height, in pixels, of the new Bitmap. |
stride | Int32 | The byte offset between the beginning of one scan line and the next, must be a multiple of four. |
format | PixelFormat | The PixelFormat enumeration for the new Bitmap. |
data | Int32[] | The pixel data. |
See Also
- enum PixelFormat
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
Bitmap(Image)
Initializes a new instance of the Bitmap
class from the specified existing image.
public Bitmap(Image original)
Parameter | Type | Description |
---|---|---|
original | Image | The Image from which to create the new Bitmap. |
See Also
- class Image
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
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)
Parameter | Type | Description |
---|---|---|
original | Image | The Image from which to create the new Bitmap |
newSize | Size | The Size structure that represent the size of the new Bitmap. |
See Also
- class Image
- struct Size
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing
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)
Parameter | Type | Description |
---|---|---|
original | Image | 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. |
See Also
- class Image
- class Bitmap
- namespace System.Drawing
- assembly Aspose.Drawing