[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.WIC.BitmapSource

Class BitmapSource

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

IWICBitmapSource

[Guid("00000120-a8f2-4877-ba0a-fd2b6645fb94")]
public class BitmapSource : ComObject, IDisposable, IUnknown
Inheritance
object
BitmapSource
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

BitmapSource(IntPtr)

Initializes a new instance of the BitmapSource class.

public BitmapSource(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

Size

Retrieves the pixel width and height of the bitmap.

public Size2L Size { get; }

Property Value

Size2L

Methods

CopyPalette(Palette, bool)

HRESULT IWICBitmapSource::CopyPalette([In, Optional] IWICPalette* pIPalette)

public bool CopyPalette(Palette paletteRef, bool checkResult = false)

Parameters

paletteRef Palette
checkResult bool

Returns

bool

CopyPixels(RectL, byte[], int)

Instructs the object to produce pixels.

public void CopyPixels(RectL rectangle, byte[] output, int stride)

Parameters

rectangle RectL

The rectangle to copy.

output byte[]

The destination array. The size of the array must be sizeof(pixel) * Width * Height

stride int

The stride (number of bytes per row).

CopyPixels(RectL, int, DataPointer)

Instructs the object to produce pixels.

public void CopyPixels(RectL rectangle, int stride, DataPointer dataPointer)

Parameters

rectangle RectL

The rectangle to copy. A null value specifies the entire bitmap.

stride int

The stride of the bitmap

dataPointer DataPointer

A reference to the buffer.

CopyPixels(byte[], int)

Instructs the object to produce pixels.

public void CopyPixels(byte[] output, int stride)

Parameters

output byte[]

The destination array. The size of the array must be sizeof(pixel) * Width * Height

stride int

The stride (number of bytes per row).

CopyPixels(int, DataPointer)

Instructs the object to produce pixels.

public void CopyPixels(int stride, DataPointer dataPointer)

Parameters

stride int

The stride of the bitmap

dataPointer DataPointer

A reference to the buffer.

CopyPixels(int, IntPtr, int)

Instructs the object to produce pixels.

public void CopyPixels(int stride, IntPtr dataPointer, int size)

Parameters

stride int

The stride of the bitmap

dataPointer System.IntPtr

A reference to the buffer.

size int

Size of the buffer in bytes.

CopyPixels(IntPtr, int, int, IntPtr)

HRESULT IWICBitmapSource::CopyPixels([In] const void* prc,[In] unsigned int cbStride,[In] unsigned int cbBufferSize,[In] void* pbBuffer)

public void CopyPixels(IntPtr rectangleRef, int stride, int bufferSize, IntPtr bufferRef)

Parameters

rectangleRef System.IntPtr
stride int
bufferSize int
bufferRef System.IntPtr

CopyPixels<T>(T[])

Instructs the object to produce pixels.

public void CopyPixels<T>(T[] output) where T : struct

Parameters

output T[]

The destination array. The size of the array must be sizeof(pixel) * Width * Height

Type Parameters

T

CopyPixels<T>(RectL, T[])

Instructs the object to produce pixels.

public void CopyPixels<T>(RectL rectangle, T[] output) where T : struct

Parameters

rectangle RectL

The rectangle to copy.

output T[]

The destination array. The size of the array must be sizeof(pixel) * rectangle.Width * rectangle.Height

Type Parameters

T

GetPixelFormat()

HRESULT IWICBitmapSource::GetPixelFormat([Out] GUID* pPixelFormat)

public Guid GetPixelFormat()

Returns

System.Guid

GetResolution(out double, out double)

HRESULT IWICBitmapSource::GetResolution([Out] double* pDpiX,[Out] double* pDpiY)

public void GetResolution(out double dpiXRef, out double dpiYRef)

Parameters

dpiXRef double
dpiYRef double

GetSize(out int, out int)

HRESULT IWICBitmapSource::GetSize([Out] unsigned int* puiWidth,[Out] unsigned int* puiHeight)

public void GetSize(out int widthRef, out int heightRef)

Parameters

widthRef int
heightRef int

Operators

explicit operator BitmapSource(IntPtr)

Performs an explicit conversion from System.IntPtr to BitmapSource.

public static explicit operator BitmapSource(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

BitmapSource