[]
Initializes an instance of the GcWicBitmap class.
public GcWicBitmap()
Public Sub New()
Initializes a new instance of the GcWicBitmap class and creates the image.
The image content is not initialized and can contain any random data.
public GcWicBitmap(int pixelWidth, int pixelHeight, bool opaque, float dpiX = 96, float dpiY = 96)
Public Sub New(pixelWidth As Integer, pixelHeight As Integer, opaque As Boolean, Optional dpiX As Single = 96, Optional dpiY As Single = 96)
Type | Name | Description |
---|---|---|
int | pixelWidth | The width of the image, in pixels. |
int | pixelHeight | The height of the image, in pixels. |
bool | opaque | Indicates whether the alpha channel should be ignored. |
float | dpiX | The horizontal dpi of the image. |
float | dpiY | The vertical dpi of the image. |
Initializes a new instance of the GcWicBitmap class.
public GcWicBitmap(Stream stream, int frameIndex = 0, Rectangle? imageRect = null)
Public Sub New(stream As Stream, Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)
Type | Name | Description |
---|---|---|
Stream | stream | The source stream. JPEG, PNG, GIF, BMP, TIFF, ICO, JPEG XR formats are supported. |
int | frameIndex | Index of an image frame to read, pass 0 for image formats not supporting multiple frames. |
Rectangle? | imageRect | Clipping rectangle of the image to be loaded. |
Initializes a new instance of the GcWicBitmap class.
public GcWicBitmap(string path, int frameIndex = 0, Rectangle? imageRect = null)
Public Sub New(path As String, Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)
Type | Name | Description |
---|---|---|
string | path | The file path to the image. JPEG, PNG, GIF, BMP, TIFF, ICO, JPEG XR formats are supported. |
int | frameIndex | Index of an image frame to read, pass 0 for image formats not supporting multiple frames. |
Rectangle? | imageRect | Clipping rectangle of the image to be loaded. |
Initializes a new instance of the GcWicBitmap class.
public GcWicBitmap(byte[] bytes, int frameIndex = 0, Rectangle? imageRect = null)
Public Sub New(bytes As Byte(), Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)
Type | Name | Description |
---|---|---|
byte[] | bytes | The image data. JPEG, PNG, GIF, BMP, TIFF, ICO, JPEG XR formats are supported. |
int | frameIndex | Index of an image frame to read, pass 0 for image formats not supporting multiple frames. |
Rectangle? | imageRect | Clipping rectangle of the image to be loaded. |
Initializes a new instance of the GcWicBitmap class.
public GcWicBitmap(Image image, Rectangle? imageRect = null)
Public Sub New(image As Image, Optional imageRect As Rectangle? = Nothing)
Type | Name | Description |
---|---|---|
Image | image | Image used as the source of image data. |
Rectangle? | imageRect | Clipping rectangle of the image to be loaded. |
Initializes a new instance of the GcWicBitmap class from an instance of GcBitmap.
If the source image is not opaque, the color channels must be premultiplied with the alpha channel.
public GcWicBitmap(GcBitmap bitmap, ImagingFactory imagingFactory = null)
Public Sub New(bitmap As GcBitmap, Optional imagingFactory As ImagingFactory = Nothing)
Type | Name | Description |
---|---|---|
GcBitmap | bitmap | The source GcBitmap. |
ImagingFactory | imagingFactory | The existing imaging factory, to avoid duplicating factories. |
Initializes a new instance of the GcWicBitmap class.
public GcWicBitmap(ImagingFactory imagingFactory)
Public Sub New(imagingFactory As ImagingFactory)
Type | Name | Description |
---|---|---|
ImagingFactory | imagingFactory | The existing imaging factory, to avoid duplicating factories. |