login about faq

Hi Matt, I'm using the latest version ChilkatXMP ActiveX component (9.5.0.0) with Delphi 5. When I try to read the XMP packet from a JPG that opens up fine in Photoshop, it doesn't work. The fileinfo also shows correctly in Photoshop. The XML document returns a value of 1 for NumEmbedded, but getting the first XML doc returns nil.

I've set debug logging on and it says:

LoadJpg:
    segType: 0xd8
    M_SOI.
    segType: 0xe1
    segmentSize: 7391
    Parsing XMP data...
    parseXmpData1:
        (leaveContext)
    XMP does not begin with xpacket.

This is the code used to read the XMP:

function ReadXMPinfo( InputFile: string ): string;
var
  i: integer;
  xml: IChilkatXml;
  ChilXMP: TChilkatXmp;

begin
  ChilXMP := TChilkatXMP.Create(nil);
  try
    // ---- DEBUGGING -----
    ChilXMP.VerboseLogging := 1;
    ChilXMP.DebugLogFilePath := 'C:\ChilLog.txt';
    // ---- DEBUGGING -----

    if ChilXMP.UnlockComponent('our unlock code') = 1 then
    begin
      if ChilXMP.LoadAppFile( InputFile ) > 0 then
      begin
        for i:= 0 to ChilXMP.NumEmbedded-1 do
        begin
          xml := ChilXMP.GetEmbedded(i);  // <-- returns nil
          if xml <> nil then
            LoadXMLtags( xml.GetRoot, List ); // function loads XML nodes into stringlist
          Result := List.CommaText;
        end;    
      end;
    end; 
  except
    on E: Exception do
      Result := 'ERROR='+E.Message;
  end;
end;

It happens with multiple images, but I've emailed one of them (00185383.jpg) to your support address.

asked Mar 20 '14 at 10:43

Vstromdude's gravatar image

Vstromdude
11


link

answered Mar 21 '14 at 00:14

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×10
×1

Asked: Mar 20 '14 at 10:43

Seen: 701 times

Last updated: Mar 21 '14 at 00:14

powered by OSQA