How to write XMP tags to JPEGsHaving retrieved a mutable BitmapMetadata object from an image I was able to read and write different scheme tags (e.g. exif).<br/> Also XMP tags worked fine. At least those at the root level.<br/> <br/> Trying to write xmp alt/seq/bag tags to the file failed with the following System.NotSupportedException (working with Vista):<br/> <br/> &quot;No imaging component suitable to complete this operation was found.&quot; with an inner exception of &quot;HRESULT: 0x88982F50&quot;.<br/>  <br/> The following code caused the error:<br/> <br/> <pre lang="x-c#">// this all happens in a using directive, wrapping the FileStream of the image BitmapMetadata meta = null; JPEGEncoder encoder = new JPEGEncoder(); // ... using (FileStream imgStream = ... ) meta = decoder.Frames[0]... ; // ensuring there is enough space for an insert meta.SetQuery(&quot;/xmp/PaddingSchema:Padding&quot;, SomeUIntValue); // setting an xmp &quot;node&quot; for &quot;complex&quot; tags meta.SetQuery(&quot;/ifd/xmp&quot;, new BitmapMetadata(&quot;xmp&quot;)); // setting an xmp &quot;container&quot; for entries meta.SetQuery(&quot;/ifd/xmp/dc:title&quot;, new BitmapMetadata(&quot;xmpalt&quot; ); // writing the tag meta.SetQuery(&quot;/ifd/xmp/dc:title/x-default&quot;, &quot;New Title&quot;); // adding metadata to encoder for writing encoder.Frames.Add(..., meta, ...) // ... closing using directive and disposing the resources of the stream // Writing the updated Metadata by using another Filestream of the image // ... using (Filestream imgStream = ...) // EXCEPTION when attempting to write metadata to file try { encoder.Save(imgStream); } catch (Exception ex) { // NotSupportedException } // ... closing using directive and disposing the resources of the stream</pre> Any suggestions greatly appreciated.© 2009 Microsoft Corporation. All rights reserved.Mon, 27 Jul 2009 15:31:10 Zce524794-a9a6-4890-a290-d2d0abd0c497http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/ce524794-a9a6-4890-a290-d2d0abd0c497#ce524794-a9a6-4890-a290-d2d0abd0c497http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/ce524794-a9a6-4890-a290-d2d0abd0c497#ce524794-a9a6-4890-a290-d2d0abd0c497diver182http://social.msdn.microsoft.com/Profile/en-US/?user=diver182How to write XMP tags to JPEGsHaving retrieved a mutable BitmapMetadata object from an image I was able to read and write different scheme tags (e.g. exif).<br/> Also XMP tags worked fine. At least those at the root level.<br/> <br/> Trying to write xmp alt/seq/bag tags to the file failed with the following System.NotSupportedException (working with Vista):<br/> <br/> &quot;No imaging component suitable to complete this operation was found.&quot; with an inner exception of &quot;HRESULT: 0x88982F50&quot;.<br/>  <br/> The following code caused the error:<br/> <br/> <pre lang="x-c#">// this all happens in a using directive, wrapping the FileStream of the image BitmapMetadata meta = null; JPEGEncoder encoder = new JPEGEncoder(); // ... using (FileStream imgStream = ... ) meta = decoder.Frames[0]... ; // ensuring there is enough space for an insert meta.SetQuery(&quot;/xmp/PaddingSchema:Padding&quot;, SomeUIntValue); // setting an xmp &quot;node&quot; for &quot;complex&quot; tags meta.SetQuery(&quot;/ifd/xmp&quot;, new BitmapMetadata(&quot;xmp&quot;)); // setting an xmp &quot;container&quot; for entries meta.SetQuery(&quot;/ifd/xmp/dc:title&quot;, new BitmapMetadata(&quot;xmpalt&quot; ); // writing the tag meta.SetQuery(&quot;/ifd/xmp/dc:title/x-default&quot;, &quot;New Title&quot;); // adding metadata to encoder for writing encoder.Frames.Add(..., meta, ...) // ... closing using directive and disposing the resources of the stream // Writing the updated Metadata by using another Filestream of the image // ... using (Filestream imgStream = ...) // EXCEPTION when attempting to write metadata to file try { encoder.Save(imgStream); } catch (Exception ex) { // NotSupportedException } // ... closing using directive and disposing the resources of the stream</pre> Any suggestions greatly appreciated.Fri, 03 Jul 2009 18:58:45 Z2009-07-03T18:58:45Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/ce524794-a9a6-4890-a290-d2d0abd0c497#44b92ab7-cdbd-491b-a094-910b7c92dae6http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/ce524794-a9a6-4890-a290-d2d0abd0c497#44b92ab7-cdbd-491b-a094-910b7c92dae6Giladkhttp://social.msdn.microsoft.com/Profile/en-US/?user=GiladkHow to write XMP tags to JPEGsHi,<br/> <br/> Did you solve this? I'm having the same problem.<br/> <br/> Gilad.Mon, 27 Jul 2009 15:31:09 Z2009-07-27T15:31:09Z