[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.Windows.GcWicBitmap.-ctor

GcWicBitmap Constructor

GcWicBitmap()

Initializes an instance of the GcWicBitmap class.

Declaration
public GcWicBitmap()
Public Sub New()

GcWicBitmap(int, int, bool, float, float)

Initializes a new instance of the GcWicBitmap class and creates the image.

The image content is not initialized and can contain any random data.

Declaration
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)
Parameters
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.

GcWicBitmap(Stream, int, Rectangle?)

Initializes a new instance of the GcWicBitmap class.

Declaration
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)
Parameters
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.

GcWicBitmap(string, int, Rectangle?)

Initializes a new instance of the GcWicBitmap class.

Declaration
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)
Parameters
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.

GcWicBitmap(byte[], int, Rectangle?)

Initializes a new instance of the GcWicBitmap class.

Declaration
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)
Parameters
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.

GcWicBitmap(Image, Rectangle?)

Initializes a new instance of the GcWicBitmap class.

Declaration
public GcWicBitmap(Image image, Rectangle? imageRect = null)
Public Sub New(image As Image, Optional imageRect As Rectangle? = Nothing)
Parameters
Type Name Description
Image image

Image used as the source of image data.

Rectangle? imageRect

Clipping rectangle of the image to be loaded.

GcWicBitmap(GcBitmap, ImagingFactory)

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.

Declaration
public GcWicBitmap(GcBitmap bitmap, ImagingFactory imagingFactory = null)
Public Sub New(bitmap As GcBitmap, Optional imagingFactory As ImagingFactory = Nothing)
Parameters
Type Name Description
GcBitmap bitmap

The source GcBitmap.

ImagingFactory imagingFactory

The existing imaging factory, to avoid duplicating factories.

See Also

GcWicBitmap(ImagingFactory)

Initializes a new instance of the GcWicBitmap class.

Declaration
public GcWicBitmap(ImagingFactory imagingFactory)
Public Sub New(imagingFactory As ImagingFactory)
Parameters
Type Name Description
ImagingFactory imagingFactory

The existing imaging factory, to avoid duplicating factories.