Ran into this only on the attached image using the latest nuget package (Q8-x64 7.0.0.16). The photo was taken with an iPhone 6.
```
System.Xml.XmlException occurred
HResult=-2146232000
LineNumber=1
LinePosition=2546
Message='.', hexadecimal value 0x00, is an invalid character. Line 1, position 2546.
Source=System.Xml
SourceUri=""
StackTrace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at ImageMagick.XmpProfile.ToXDocument()
```
Any ideas?
Thanks,
tim
Comments: It looks like the file contains a trailing '\0' character that should not be there. I have added a check for this to the XmpProfile class and I can now extract the XMP profile. This will be available in the next release. If this is urgent you can contact me through CodePlex and get a development build (x86/x64 only)
```
System.Xml.XmlException occurred
HResult=-2146232000
LineNumber=1
LinePosition=2546
Message='.', hexadecimal value 0x00, is an invalid character. Line 1, position 2546.
Source=System.Xml
SourceUri=""
StackTrace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at ImageMagick.XmpProfile.ToXDocument()
```
Any ideas?
Thanks,
tim
Comments: It looks like the file contains a trailing '\0' character that should not be there. I have added a check for this to the XmpProfile class and I can now extract the XMP profile. This will be available in the next release. If this is urgent you can contact me through CodePlex and get a development build (x86/x64 only)