login about faq

I am trying to read XMP from a jpg but with no luck. Running in VS2013, using latest C# x64 chilkat XMP download, .net 4.5,

The image has 5 embedded xmp docs, when I break into line xmp.GetEmbedded(i), doc is always empty. I have verified valid XMP exists in the photo using another XMP viewer.

        var xmp = new Xmp();
        xmp.UnlockComponent("anything for 30-day trial");
        xmp.LoadAppFile(@"c:\_dev\testphotos\june 28 005.JPG");

        var n = xmp.NumEmbedded;

        for (var i =0; i<n; i++)
            var doc = xmp.GetEmbedded(i);

What am I missing?

asked Jan 19 '14 at 15:27

llaakes's gravatar image


Thanks. I received your email with the JPG, and I will test it now..


answered Jan 20 '14 at 13:45

chilkat's gravatar image

chilkat ♦♦

I tested, but did not find any problem. I noticed two things: You're not checking the return value of UnlockComponent or LoadAppFile. Check that these methods return true for success, and if not, then examine the contents of the LastErrorText.


answered Jan 20 '14 at 14:27

chilkat's gravatar image

chilkat ♦♦

OK found the problem.

I misinterpreted the docs. I was using Chilkat.Xml.Content but should have been using Chilkat.Xml.GetXml().

When I switched it works fine.


answered Jan 22 '14 at 10:18

llaakes's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jan 19 '14 at 15:27

Seen: 2,469 times

Last updated: Jan 22 '14 at 10:18

powered by OSQA