XMConvertFloatToHalfStream
XMConvertHalfToFloatStream
XMMatrixDecompose
XMPlaneTransformStream
XMVector2TransformCoordStream
XMVector2TransformNormalStream
XMVector2TransformStream
XMVector3ProjectStream
XMVector3TransformCoordStream
XMVector3TransformNormalStream
XMVector3TransformStream
XMVector3UnprojectStream
XMVector4TransformStream
Expand Minimize

IWICFastMetadataEncoder interface

Exposes methods used for in-place metadata editing. A fast metadata encoder enables you to add and remove metadata to an image without having to fully re-encode the image.

Members

The IWICFastMetadataEncoder interface inherits from the IUnknown interface. IWICFastMetadataEncoder also has these types of members:

Methods

The IWICFastMetadataEncoder interface has these methods.

MethodDescription
Commit

Finalizes metadata changes to the image stream.

GetMetadataQueryWriter

Retrieves a metadata query writer for fast metadata encoding.

 

Remarks

A decoder must be created using the WICDecodeOptions value WICDecodeMetadataCacheOnDemand to perform in-place metadata updates. Using the WICDecodeMetadataCacheOnLoad option causes the decoder to release the file stream necessary to perform the metadata updates.

Not all metadata formats support fast metadata encoding. The native metadata handlers that support metadata are IFD, Exif, XMP, and GPS.

If a fast metadata encoder fails, the image will need to be fully re-encoded to add the metadata.

Examples

The following demonstrates how to obtain a fast metadata encoder from an image frame and use its query writer to write a metadata item.


IWICFastMetadataEncoder *pFME = NULL;
IWICMetadataQueryWriter *pFMEQW = NULL;

hr = pFactory->CreateFastMetadataEncoderFromFrameDecode(pFrameDecode, &pFME);

if (SUCCEEDED(hr))
{
 	hr = pFME->GetMetadataQueryWriter(&pFMEQW);
}

if (SUCCEEDED(hr))
{
	 // Add additional metadata
 	PROPVARIANT value;

	 PropVariantInit(&value);

 	value.vt = VT_UI2;
	 value.uiVal = 99;
 	hr = pFMEQW->SetMetadataByName(L"/app1/ifd/{ushort=18249}", &value);

 	PropVariantClear(&value);
}

if (SUCCEEDED(hr))
{
	 hr = pFME->Commit();
}

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

DLL

Windowscodecs.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft