[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.WIC.BitmapDecoder

Class BitmapDecoder

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

IWICBitmapDecoder

[Guid("9EDDE9E7-8DEE-47ea-99DF-E6FAF2ED44BF")]
public class BitmapDecoder : ComObject, IDisposable, IUnknown
Inheritance
object
BitmapDecoder
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

BitmapDecoder(IntPtr)

Initializes a new instance of the BitmapDecoder class.

public BitmapDecoder(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Methods

CopyPalette(Palette)

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

public void CopyPalette(Palette paletteRef)

Parameters

paletteRef Palette

Create(BitmapDecoderInfo)

Initializes a new instance of the BitmapDecoder class from a BitmapDecoderInfo.

public static BitmapDecoder Create(BitmapDecoderInfo bitmapDecoderInfo)

Parameters

bitmapDecoderInfo BitmapDecoderInfo

The bitmap decoder info.

Returns

BitmapDecoder

Create(ImagingFactory, IStream, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a IStream.

public static BitmapDecoder Create(ImagingFactory factory, IStream streamRef, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

streamRef IStream

The stream ref.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Create(ImagingFactory, IStream, Guid, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a IStream.

public static BitmapDecoder Create(ImagingFactory factory, IStream streamRef, Guid guidVendorRef, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

streamRef IStream

The stream ref.

guidVendorRef System.Guid

The GUID vendor ref.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Create(ImagingFactory, Guid, Guid)

Initializes a new instance of the BitmapDecoder class.

public static BitmapDecoder Create(ImagingFactory factory, Guid containerFormatGuid, Guid guidVendorRef)

Parameters

factory ImagingFactory

The factory.

containerFormatGuid System.Guid

The container format GUID.

guidVendorRef System.Guid

The GUID vendor ref.

Returns

BitmapDecoder

Create(ImagingFactory, Guid)

Initializes a new instance of the BitmapDecoder class from a guid. BitmapDecoderGuids for a list of default supported decoder.

public static BitmapDecoder Create(ImagingFactory factory, Guid containerFormatGuid)

Parameters

factory ImagingFactory

The factory.

containerFormatGuid System.Guid

The container format GUID.

Returns

BitmapDecoder

Create(ImagingFactory, FileStream, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a filestream.

public static BitmapDecoder Create(ImagingFactory factory, FileStream fileStream, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

fileStream System.IO.FileStream

The filename.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Create(ImagingFactory, FileStream, Guid, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a filestream.

public static BitmapDecoder Create(ImagingFactory factory, FileStream fileStream, Guid guidVendorRef, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

fileStream System.IO.FileStream

The filename.

guidVendorRef System.Guid

The GUID vendor ref.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Create(ImagingFactory, Stream, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a IStream.

public static BitmapDecoder Create(ImagingFactory factory, Stream streamRef, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

streamRef System.IO.Stream

The stream ref.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Create(ImagingFactory, Stream, Guid, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a IStream.

public static BitmapDecoder Create(ImagingFactory factory, Stream streamRef, Guid guidVendorRef, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

streamRef System.IO.Stream

The stream ref.

guidVendorRef System.Guid

The GUID vendor ref.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Create(ImagingFactory, string, NativeFileAccess, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a file.

public static BitmapDecoder Create(ImagingFactory factory, string filename, NativeFileAccess desiredAccess, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

filename string

The filename.

desiredAccess NativeFileAccess

The desired access.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Create(ImagingFactory, string, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a file in read mode.

public static BitmapDecoder Create(ImagingFactory factory, string filename, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

filename string

The filename.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Create(ImagingFactory, string, Guid?, NativeFileAccess, DecodeOptions)

Initializes a new instance of the BitmapDecoder class from a file.

public static BitmapDecoder Create(ImagingFactory factory, string filename, Guid? guidVendorRef, NativeFileAccess desiredAccess, DecodeOptions metadataOptions)

Parameters

factory ImagingFactory

The factory.

filename string

The filename.

guidVendorRef System.Guid?

The GUID vendor ref.

desiredAccess NativeFileAccess

The desired access.

metadataOptions DecodeOptions

The metadata options.

Returns

BitmapDecoder

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

GetColorContexts(int, ComArray<ColorContext>, out int)

HRESULT IWICBitmapDecoder::GetColorContexts([In] unsigned int cCount,[InOut, Buffer, Optional] IWICColorContext** ppIColorContexts,[Out] unsigned int* pcActualCount)

public HResult GetColorContexts(int count, ComArray<ColorContext> colorContextsOut, out int actualCountRef)

Parameters

count int
colorContextsOut ComArray<ColorContext>
actualCountRef int

Returns

HResult

GetColorContexts(int, ColorContext[], out int)

HRESULT IWICBitmapDecoder::GetColorContexts([In] unsigned int cCount,[InOut, Buffer, Optional] IWICColorContext** ppIColorContexts,[Out] unsigned int* pcActualCount)

public HResult GetColorContexts(int count, ColorContext[] colorContextsOut, out int actualCountRef)

Parameters

count int
colorContextsOut ColorContext[]
actualCountRef int

Returns

HResult

GetContainerFormat()

HRESULT IWICBitmapDecoder::GetContainerFormat([Out] GUID* pguidContainerFormat)

public Guid GetContainerFormat()

Returns

System.Guid

GetDecoderInfo()

HRESULT IWICBitmapDecoder::GetDecoderInfo([Out] IWICBitmapDecoderInfo** ppIDecoderInfo)

public BitmapDecoderInfo GetDecoderInfo()

Returns

BitmapDecoderInfo

GetFrame(int)

HRESULT IWICBitmapDecoder::GetFrame([In] unsigned int index,[Out] IWICBitmapFrameDecode** ppIBitmapFrame)

public BitmapFrameDecode GetFrame(int index)

Parameters

index int

Returns

BitmapFrameDecode

GetFrameCount()

HRESULT IWICBitmapDecoder::GetFrameCount([Out] unsigned int* pCount)

public int GetFrameCount()

Returns

int

GetMetadataQueryReader()

HRESULT IWICBitmapDecoder::GetMetadataQueryReader([Out] IWICMetadataQueryReader** ppIMetadataQueryReader)

public MetadataQueryReader GetMetadataQueryReader()

Returns

MetadataQueryReader

GetPreview()

HRESULT IWICBitmapDecoder::GetPreview([Out] IWICBitmapSource** ppIBitmapSource)

public BitmapSource GetPreview()

Returns

BitmapSource

GetThumbnail()

HRESULT IWICBitmapDecoder::GetThumbnail([Out] IWICBitmapSource** ppIThumbnail)

public BitmapSource GetThumbnail()

Returns

BitmapSource

Initialize(IStream, DecodeOptions)

Initializes the decoder with the provided stream.

public void Initialize(IStream stream, DecodeOptions cacheOptions)

Parameters

stream IStream

The stream to use for initialization.

cacheOptions DecodeOptions

The cache options.

QueryCapability(IStream)

Queries the capabilities of the decoder based on the specified stream.

public BitmapDecoderCapabilities QueryCapability(IStream stream)

Parameters

stream IStream

The stream to retrieve the decoder capabilities from..

Returns

BitmapDecoderCapabilities

Capabilities of the decoder

TryGetColorContexts(ImagingFactory, out ColorContext[])

Get the ColorContext of the image (if any)

public HResult TryGetColorContexts(ImagingFactory imagingFactory, out ColorContext[] colorContexts)

Parameters

imagingFactory ImagingFactory

The factory for creating new color contexts

colorContexts ColorContext[]

The color context array, or null

Returns

HResult

Remarks

When the image format does not support color contexts,

TryGetColorContexts(ImagingFactory)

Get the ColorContext of the image (if any)

public ColorContext[] TryGetColorContexts(ImagingFactory imagingFactory)

Parameters

imagingFactory ImagingFactory

Returns

ColorContext[]

null if the decoder does not support color contexts; otherwise an array of zero or more ColorContext objects

Operators

explicit operator BitmapDecoder(IntPtr)

Performs an explicit conversion from System.IntPtr to BitmapDecoder.

public static explicit operator BitmapDecoder(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

BitmapDecoder