[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.WIC.BitmapFrameEncode

Class BitmapFrameEncode

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

IWICBitmapFrameEncode

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

BitmapFrameEncode(IntPtr)

Initializes a new instance of the BitmapFrameEncode class.

public BitmapFrameEncode(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

Options

Gets the properties to setup before Initialize().

public BitmapEncoderOptions Options { get; }

Property Value

BitmapEncoderOptions

Methods

Commit()

HRESULT IWICBitmapFrameEncode::Commit()

public void Commit()

Create(BitmapEncoder)

Initializes a new instance of the BitmapFrameEncode class.

public static BitmapFrameEncode Create(BitmapEncoder encoder)

Parameters

encoder BitmapEncoder

The encoder.

Returns

BitmapFrameEncode

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

GetMetadataQueryWriter()

HRESULT IWICBitmapFrameEncode::GetMetadataQueryWriter([Out] IWICMetadataQueryWriter** ppIMetadataQueryWriter)

public MetadataQueryWriter GetMetadataQueryWriter()

Returns

MetadataQueryWriter

Initialize()

Initializes this instance.

public void Initialize()

Initialize(PropertyBag)

HRESULT IWICBitmapFrameEncode::Initialize([In, Optional] IPropertyBag2* pIEncoderOptions)

public void Initialize(PropertyBag encoderOptionsRef)

Parameters

encoderOptionsRef PropertyBag

SetColorContexts(ColorContext[])

Sets the ColorContext objects for this frame encoder.

public void SetColorContexts(ColorContext[] colorContextOut)

Parameters

colorContextOut ColorContext[]

The color contexts to set for the encoder.

SetColorContexts(int, ComArray<ColorContext>)

HRESULT IWICBitmapFrameEncode::SetColorContexts([In] unsigned int cCount,[In, Buffer] IWICColorContext** ppIColorContext)

public void SetColorContexts(int count, ComArray<ColorContext> colorContextOut)

Parameters

count int
colorContextOut ComArray<ColorContext>

SetColorContexts(int, ColorContext[])

HRESULT IWICBitmapFrameEncode::SetColorContexts([In] unsigned int cCount,[In, Buffer] IWICColorContext** ppIColorContext)

public void SetColorContexts(int count, ColorContext[] colorContextOut)

Parameters

count int
colorContextOut ColorContext[]

SetPalette(Palette)

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

public void SetPalette(Palette paletteRef)

Parameters

paletteRef Palette

SetPixelFormat(ref Guid)

HRESULT IWICBitmapFrameEncode::SetPixelFormat([InOut] GUID* pPixelFormat)

public void SetPixelFormat(ref Guid pixelFormatRef)

Parameters

pixelFormatRef System.Guid

SetResolution(double, double)

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

public void SetResolution(double dpiX, double dpiY)

Parameters

dpiX double
dpiY double

SetSize(int, int)

HRESULT IWICBitmapFrameEncode::SetSize([In] unsigned int uiWidth,[In] unsigned int uiHeight)

public void SetSize(int width, int height)

Parameters

width int
height int

SetThumbnail(BitmapSource)

HRESULT IWICBitmapFrameEncode::SetThumbnail([In, Optional] IWICBitmapSource* pIThumbnail)

public void SetThumbnail(BitmapSource thumbnailRef)

Parameters

thumbnailRef BitmapSource

WritePixels(int, DataRectangle, int)

Encodes the frame scanlines.

public void WritePixels(int lineCount, DataRectangle buffer, int totalSizeInBytes = 0)

Parameters

lineCount int

The number of lines to encode.

buffer DataRectangle

A data buffer containing the pixels to copy from.

totalSizeInBytes int

Total size in bytes of pixels to write. If == 0, size is calculated with lineCount * rowStride.

Remarks

Successive WritePixels calls are assumed to be sequential scanline access in the output image.

WritePixels(int, int, int, IntPtr)

HRESULT IWICBitmapFrameEncode::WritePixels([In] unsigned int lineCount,[In] unsigned int cbStride,[In] unsigned int cbBufferSize,[In, Buffer] void* pbPixels)

public void WritePixels(int lineCount, int stride, int bufferSize, IntPtr pixelsRef)

Parameters

lineCount int
stride int
bufferSize int
pixelsRef System.IntPtr

WritePixels(int, IntPtr, int, int)

Encodes the frame scanlines.

public void WritePixels(int lineCount, IntPtr buffer, int rowStride, int totalSizeInBytes = 0)

Parameters

lineCount int

The number of lines to encode.

buffer System.IntPtr

A data buffer containing the pixels to copy from.

rowStride int

The stride of one row.

totalSizeInBytes int

Total size in bytes of pixels to write. If == 0, size is calculated with lineCount * rowStride.

Remarks

Successive WritePixels calls are assumed to be sequential scanline access in the output image.

WritePixels<T>(int, int, T[])

Encodes the frame scanlines.

public void WritePixels<T>(int lineCount, int stride, T[] pixelBuffer) where T : struct

Parameters

lineCount int

The number of lines to encode.

stride int

The stride of the image pixels.

pixelBuffer T[]

A reference to the pixel buffer.

Type Parameters

T

Remarks

Successive WritePixels calls are assumed to be sequential scanline access in the output image.

WriteSource(BitmapSource, RectL)

Encodes a bitmap source.

public void WriteSource(BitmapSource bitmapSourceRef, RectL rectangleRef)

Parameters

bitmapSourceRef BitmapSource

The bitmap source to encode.

rectangleRef RectL

The size rectangle of the bitmap source.

Remarks

If SetSize is not called prior to calling WriteSource, the size given in prc is used if not null. Otherwise, the size of the BitmapSource given in pIBitmapSource is used.

If SetPixelFormat is not called prior to calling WriteSource, the pixel format of the BitmapSource given in pIBitmapSource is used.

If SetResolution is not called prior to calling WriteSource, the pixel format of pIBitmapSource is used.

If SetPalette is not called prior to calling WriteSource, the target pixel format is indexed, and the pixel format of pIBitmapSource matches the encoder frame's pixel format, then the pIBitmapSource pixel format is used.

When encoding a GIF image, if the global palette is set and the frame level palette is not set directly by the user or by a custom independent software vendor (ISV) GIF codec, WriteSource will use the global palette to encode the frame even when pIBitmapSource has a frame level palette.

Windows Vista:The source rect width must match the width set through SetSize. Repeated WriteSource calls can be made as long as the total accumulated source rect height is the same as set through SetSize.

WriteSource(BitmapSource, IntPtr)

HRESULT IWICBitmapFrameEncode::WriteSource([In, Optional] IWICBitmapSource* pIBitmapSource,[In] void* prc)

public void WriteSource(BitmapSource bitmapSourceRef, IntPtr rectangleRef)

Parameters

bitmapSourceRef BitmapSource
rectangleRef System.IntPtr

WriteSource(BitmapSource)

Encodes a bitmap source.

public void WriteSource(BitmapSource bitmapSource)

Parameters

bitmapSource BitmapSource

The bitmap source to encode.

Remarks

If SetSize is not called prior to calling WriteSource, the size given in prc is used if not null. Otherwise, the size of the BitmapSource given in pIBitmapSource is used.

If SetPixelFormat is not called prior to calling WriteSource, the pixel format of the BitmapSource given in pIBitmapSource is used.

If SetResolution is not called prior to calling WriteSource, the pixel format of pIBitmapSource is used.

If SetPalette is not called prior to calling WriteSource, the target pixel format is indexed, and the pixel format of pIBitmapSource matches the encoder frame's pixel format, then the pIBitmapSource pixel format is used.

When encoding a GIF image, if the global palette is set and the frame level palette is not set directly by the user or by a custom independent software vendor (ISV) GIF codec, WriteSource will use the global palette to encode the frame even when pIBitmapSource has a frame level palette.

Windows Vista:The source rect width must match the width set through SetSize. Repeated WriteSource calls can be made as long as the total accumulated source rect height is the same as set through SetSize.

Operators

explicit operator BitmapFrameEncode(IntPtr)

Performs an explicit conversion from System.IntPtr to BitmapFrameEncode.

public static explicit operator BitmapFrameEncode(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

BitmapFrameEncode