IWICMetadataQueryWriter interface (wincodec.h)
Exposes methods for setting or removing metadata blocks and items to an encoder or its image frames using a metadata query expression.
Inheritance
The IWICMetadataQueryWriter interface inherits from IWICMetadataQueryReader. IWICMetadataQueryWriter also has these types of members:
Methods
The IWICMetadataQueryWriter interface has these methods.
IWICMetadataQueryWriter::RemoveMetadataByName Removes a metadata item from a specific location using a metadata query expression. |
IWICMetadataQueryWriter::SetMetadataByName Sets a metadata item to a specific location. |
Remarks
A metadata query writer uses metadata query expressions to set or remove metadata. For more information on the metadata query language, see the Metadata Query Language Overview.
Examples
The following code demonstrates how to create an XMP query writer and add a new metadata item to it.
// Create XMP block
IWICMetadataQueryWriter *pXMPWriter = NULL;
if (SUCCEEDED(hr))
{
hr = pFactory->CreateQueryWriter(GUID_MetadataFormatXMP, NULL, &pXMPWriter);
}
// Write metadata to the XMP writer
if (SUCCEEDED(hr))
{
PROPVARIANT value;
PropVariantInit(&value);
value.vt = VT_LPWSTR;
value.pwszVal = L"Metadata Test Image.";
hr = pXMPWriter->SetMetadataByName(L"/dc:title", &value);
PropVariantClear(&value);
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2, Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | wincodec.h |
See also
Conceptual
How-to: Re-encode a JPEG Image with Metadata
Metadata Query Language Overview