Note that there are some explanatory texts on larger screens.

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

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload