[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.WIC.Bitmap

Class Bitmap

Namespace
GrapeCity.Documents.DX.WIC
Assembly
GcDocs.DX.Windows.dll

IWICBitmap

[Guid("00000121-a8f2-4877-ba0a-fd2b6645fb94")]
public class Bitmap : BitmapSource, IDisposable, IUnknown
Inheritance
object
Bitmap
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Bitmap(IntPtr)

Initializes a new instance of the Bitmap class.

public Bitmap(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Methods

Create(ImagingFactory, BitmapSource, RectL)

Initializes a new instance of the Bitmap class from a BitmapSource.

public static Bitmap Create(ImagingFactory factory, BitmapSource bitmapSource, RectL rectangle)

Parameters

factory ImagingFactory

The factory.

bitmapSource BitmapSource

The bitmap source.

rectangle RectL

The rectangle.

Returns

Bitmap

Create(ImagingFactory, BitmapSource, BitmapCreateCacheOption)

Initializes a new instance of the Bitmap class from a BitmapSource

public static Bitmap Create(ImagingFactory factory, BitmapSource bitmapSource, BitmapCreateCacheOption option)

Parameters

factory ImagingFactory

The factory.

bitmapSource BitmapSource

The bitmap source ref.

option BitmapCreateCacheOption

The option.

Returns

Bitmap

Create(ImagingFactory, int, int, Guid, DataRectangle, int)

Initializes a new instance of the Bitmap class from a memory location using DataRectangle.

public static Bitmap Create(ImagingFactory factory, int width, int height, Guid pixelFormat, DataRectangle dataRectangle, int totalSizeInBytes = 0)

Parameters

factory ImagingFactory

The factory.

width int

The width.

height int

The height.

pixelFormat System.Guid

The pixel format.

dataRectangle DataRectangle

The data rectangle.

totalSizeInBytes int

Size of the buffer in dataRectangle. If == 0, calculate the size automatically based on the height and row pitch.

Returns

Bitmap

Create(ImagingFactory, int, int, Guid, BitmapCreateCacheOption)

Initializes a new instance of the Bitmap class.

public static Bitmap Create(ImagingFactory factory, int width, int height, Guid pixelFormat, BitmapCreateCacheOption option)

Parameters

factory ImagingFactory

The factory.

width int

The width.

height int

The height.

pixelFormat System.Guid

The pixel format. PixelFormat for a list of valid formats.

option BitmapCreateCacheOption

The option.

Returns

Bitmap

Lock(RectL, BitmapLockFlags)

Provides access to a rectangular area of the bitmap.

public BitmapLock Lock(RectL rcLockRef, BitmapLockFlags flags)

Parameters

rcLockRef RectL

The rectangle to be accessed.

flags BitmapLockFlags

The access mode you wish to obtain for the lock. This is a bitwise combination of BitmapLockFlags for read, write, or read and write access.

ValueMeaning
Read

The read access lock.

Write

The write access lock.

?

Returns

BitmapLock

A reference that receives the locked memory location.

Remarks

Locks are exclusive for writing but can be shared for reading. You cannot call CopyPixels while the Bitmap is locked for writing. Doing so will return an error, since locks are exclusive.

Lock(BitmapLockFlags)

Provides access to a rectangular area of the bitmap.

public BitmapLock Lock(BitmapLockFlags flags)

Parameters

flags BitmapLockFlags

The access mode you wish to obtain for the lock. This is a bitwise combination of BitmapLockFlags for read, write, or read and write access.

ValueMeaning
Read

The read access lock.

Write

The write access lock.

?

Returns

BitmapLock

A reference that receives the locked memory location.

Remarks

Locks are exclusive for writing but can be shared for reading. You cannot call CopyPixels while the Bitmap is locked for writing. Doing so will return an error, since locks are exclusive.

Lock(IntPtr, BitmapLockFlags)

HRESULT IWICBitmap::Lock([In] const void* prcLock,[In] WICBitmapLockFlags flags,[Out] IWICBitmapLock** ppILock)

public BitmapLock Lock(IntPtr rcLockRef, BitmapLockFlags flags)

Parameters

rcLockRef System.IntPtr
flags BitmapLockFlags

Returns

BitmapLock

New<T>(ImagingFactory, int, int, Guid, T[], int)

Initializes a new instance of the Bitmap class from an array of pixel datas.

public static Bitmap New<T>(ImagingFactory factory, int width, int height, Guid pixelFormat, T[] pixelDatas, int stride = 0) where T : struct

Parameters

factory ImagingFactory

The factory.

width int

The width.

height int

The height.

pixelFormat System.Guid

The pixel format.

pixelDatas T[]

The pixel datas.

stride int

Stride of a row of pixels (number of bytes per row). By default the stride is == 0, and calculated by taking the sizeof(T) * width.

Returns

Bitmap

Type Parameters

T

SetPalette(Palette)

HRESULT IWICBitmap::SetPalette([In, Optional] IWICPalette* pIPalette)

public void SetPalette(Palette paletteRef)

Parameters

paletteRef Palette

SetResolution(double, double)

HRESULT IWICBitmap::SetResolution([In] double dpiX,[In] double dpiY)

public void SetResolution(double dpiX, double dpiY)

Parameters

dpiX double
dpiY double

Operators

explicit operator Bitmap(IntPtr)

Performs an explicit conversion from System.IntPtr to Bitmap.

public static explicit operator Bitmap(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

Bitmap