[]
        
(Showing Draft Content)

C1.Win.Bitmap.C1Bitmap.Import

Import Method

Import(C1Bitmap)

Loads the image from another instance of C1Bitmap.

Declaration
public void Import(C1Bitmap bitmap)
Parameters
Type Name Description
C1Bitmap bitmap

The source bitmap.

Import(byte[], int, int, PixelFormat)

Loads the image from a byte array containing the pixels buffer.

Declaration
public void Import(byte[] bytes, int width, int height, PixelFormat pixelFormat)
Parameters
Type Name Description
byte[] bytes

The source byte array with pixel buffer.

int width

The width of the image, in pixels.

int height

The height of the image, in pixels.

PixelFormat pixelFormat

The pixel format of the image.

Import(byte[], int, int, int, PixelFormat)

Loads the image from a byte array containing the pixels buffer with specified stride (bytes per row of pixels).

Declaration
public void Import(byte[] bytes, int stride, int width, int height, PixelFormat pixelFormat)
Parameters
Type Name Description
byte[] bytes

The source byte array with pixel buffer.

int stride

The stride (bytes per row) of the image data in the source byte array.

int width

The width of the image, in pixels.

int height

The height of the image, in pixels.

PixelFormat pixelFormat

The pixel format of the image.

Import(IntPtr, int, int, PixelFormat)

Loads the image from a unmanaged block of memory pointed by IntPtr.

Declaration
public void Import(IntPtr srcPtr, int width, int height, PixelFormat pixelFormat)
Parameters
Type Name Description
IntPtr srcPtr

The pointer to the beginning of the unmanaged block of memory.

int width

The width of the image, in pixels.

int height

The height of the image, in pixels.

PixelFormat pixelFormat

The pixel format of the image.

Import(IntPtr, int, int, int, PixelFormat)

Loads the image from a unmanaged block of memory pointed by IntPtr and having the specified stride (bytes per row of pixels).

Declaration
public void Import(IntPtr srcPtr, int stride, int width, int height, PixelFormat pixelFormat)
Parameters
Type Name Description
IntPtr srcPtr

The pointer to the beginning of the unmanaged block of memory.

int stride

The stride (bytes per row) of the source image data.

int width

The width of the image, in pixels.

int height

The height of the image, in pixels.

PixelFormat pixelFormat

The pixel format of the image.

Import(Bitmap)

Loads the image from a System.Drawing.Bitmap.

Declaration
public void Import(Bitmap gdiBitmap)
Parameters
Type Name Description
Bitmap gdiBitmap

The source System.Drawing.Bitmap.

Import(Bitmap1)

Loads the image from a D2D.Bitmap1 (created with D2D.BitmapOptions.CpuRead).

Declaration
public void Import(Bitmap1 d2dBitmap)
Parameters
Type Name Description
Bitmap1 d2dBitmap

The source D2D.Bitmap1 image created with D2D.BitmapOptions.CpuRead.

Import(Bitmap1, DeviceContext, RectL)

Loads the image from a D2D.Bitmap1.

Declaration
public void Import(Bitmap1 d2dBitmap, DeviceContext context, RectL srcRect)
Parameters
Type Name Description
Bitmap1 d2dBitmap

The source D2D.Bitmap1 image.

DeviceContext context

The device context used to create a D2D bitmap.

RectL srcRect

The source rectangle within d2dBitmap.