I have gone through the documentation at: http://msdn.microsoft.com/en-us/library/windows/desktop/ee719799(v=vs.85).aspx
As context, I am trying to encode in the JPEG-XR format and I want to emulate GDI+'s SetPropertyItem
, GetPropertyItem
functionality.
I basically have 3 questions:
- If I want to add a custom property to the exif header what is the correct query path?
- Can I use a custom ID, say
{ushort=1111}
to identify it and how do I verify if an ID is already defined? - Is this the same as the
id
field of GdiPlus::PropertyItem?
For example, is the following valid:
PROPVARIANT value;
value.vt = VT_LPWSTR;
value.pwszVal= L"Metadata Test";
hr = piFrameQWriter->SetMetadataByName(L"/ifd/exif/{ushort=1111}");
This code block succeeds, but when I try to read back the same metadata using:
IWICMetadataQueryReader *pQueryReader = NULL;
if(SUCCEEDED(hr))
{
hr = piFrame->GetMetadataQueryReader(&pQueryReader);
}
if (SUCCEEDED(hr))
{
PROPVARIANT value;
hr = pQueryReader->GetMetadataByName(L"/ifd/exif/{ushort=1111}", &value);
}
This returns E_INVALIDARG error.
I'd appreciate some help in understanding how this works. I feel like I have not understood the documentation correctly.
Thank you.