Quantcast
Channel: Adobe Community: Message List - XMP SDK
Viewing all 801 articles
Browse latest View live

Re: Problems registering XMPCore and XMPFiles .dll


Re: XMPFilesStatic.lib(Host_IO-Win.obj):-1: Error:LNK2001

Re: XMPFilesStatic.lib(Host_IO-Win.obj):-1: Error:LNK2001

$
0
0

All symbols are defined in the system library advapi32.lib.

Try searching for the symbol names on MSDN but leave out the "__imp__" part, e.g. search for OpenProcessToken.

 

Cheers,

Jens


DocumentAncestors Not Adhering To XMP Specification In Photoshop

$
0
0

Hi All,

 

I'm currently in the process of writing a XMP sidecar parser. However I have an issue when it comes to the Photoshop namespace. Within the speificaion it says DocumentAncestors are as follows:

 

photoshop:DocumentAncestors -> unordered array of Ancestor

 

Which would be the following XML:

 

        <photoshop:DocumentAncestors>

          <rdf:Bag>

                <rdf:li rdf:parseType="Resource">

                     <photoshop:AncestorID>uuid:cc3c1681-88d1-41c8-8b08-8d245fa78d61</phot oshop:AncestorID>

               </rdf:li>

          </rdf:Bag>

        </photoshop:DocumentAncestors>

 

However the acutal ouytput I get from Photoshop CS is:

 

        <photoshop:DocumentAncestors>

          <rdf:Bag>

            <rdf:li>uuid:cc3c1681-88d1-41c8-8b08-8d245fa78d61</rdf:li>

          </rdf:Bag>

        </photoshop:DocumentAncestors>

 

 

As you can see it is different as does not follow the specifcation, do older version of Photoshop adhere to the speification?

 

What to people determine the best approach is ?

Re: XMPFilesStatic.lib(Host_IO-Win.obj):-1: Error:LNK2001

$
0
0

Thank you for giving directions, I just did not include the windows SDK properly.

Re: Static library XMPFilesStatic throws LNK2001 errors

$
0
0

Hey Sunil,

 

because the samples compiled, I revisited all relevant the code and found #ifdef_WIN32 missing at one point. Afterwards it compiled just fine.

 

Thanks,

smon

"XMPFiles::GetXMP - No open file" on random files, on random occasions.

$
0
0

Hi!

 

When reading XMP data from files, the toolkit sometimes fails to open the file and I am not quite sure how to approach the problem. My method:

 

QStringXmpParser::getXmpContent(QStringfilePath)

{
    try{
        SXMPMeta::Initialize();
        SXMPFiles::Initialize();

        XMP_VersionInfocoreVersion;
        SXMPMeta::GetVersionInfo(&coreVersion);

        std::stringxmpContent;
        XMP_OptionBitsopts=kXMPFiles_OpenForRead|kXMPFiles_OpenUsePacketScanning;
        XMP_StringPtrfilenamePtr=(XMP_StringPtr)filePath.toUtf8();

        SXMPFilesmyfile;
        if(!myfile.Initialize(opts)){
            qDebug()<<"FailedtoinitializeSXMPFile.";
        }
        if(!myfile.OpenFile(filenamePtr,kXMP_UnknownFile,opts)){
            qDebug()<<"FailedtoopenSXMPFilefor"<<filePath;
        }
        if(!myfile.GetXMP(NULL,&xmpContent)){
            qDebug()<<"NoXMPdatainfile"<<filePath;
        }

        SXMPFiles::Terminate();
        SXMPMeta::Terminate();

        returnQString::fromUtf8(xmpContent.c_str());
    }catch(XMP_Error&e){
        qDebug()<<"Exception:"<<e.GetErrMsg();
        return"";
    }
}

 

I often get the output:

 

Failed to open SXMPFile for  "(...)52x61.jpg"

Exception:  XMPFiles::GetXMP - No open file


Oddly, rescanning the file may solve the problem - so I am not sure where there is a problem in the first place. Are there any alterations for the code I should try?

 

Greetings,

smon

Re: "XMPFiles::GetXMP - No open file" on random files, on random occasions.

$
0
0

Hi Dersomn,

    You have already initialized XMPFiles by calling "SXMPFiles::Initialize();" why are you again trying to initialize with the following statement

if(!myfile.Initialize(opts)){

     qDebug()<<"FailedtoinitializeSXMPFile.";

}

 

    This code is not required. However theorecticaly there shouldn't be any issue by calling the above statement. But if you can please remove it.

 

 

   I tried on my end to reproduce the issue but I couldn't find any issue. You have the same statement which XMP SDK provides in ReadingXMP example.

 

   So could you please let me know

     1. Is the above code failes first time on the a file and second time runs successfully on the same file

or  2. There are a set of files. And when you runs the above code it runs fine for some files not for all but next time passes for those files.

 

     If you can please send me the file(s) and steps to reproduce the issue.

 

-Sunil

   


reading XMP includes strange characters

$
0
0

I'm trying to read XMP from a file, and sometimes I get weird characters back like this "© 2013".

Re: reading XMP includes strange characters

$
0
0

Are you using ReadingXMP sample which is provided with XMP SDK? If not, XMP SDK provided ReadingXMP sample, please build and use it or send the code which you are using.

 

If you are using ReadingXMP, could you please send the file you are trying to read and code changes if you have done any.

 

-Sunil

Re: "XMPFiles::GetXMP - No open file" on random files, on random occasions.

$
0
0

Hey Sunil,

 

I removed the redundant code. There actually is a set of files. I just did some test runs to reproduce the problem:

 

The first time I started the program, everything worked a expected... After a program restart, I did multiple exports, the results:

 

  1. export: files 1-2, 4-24 could not be opened, as described in my original post, the rest was exported correctly
  2. to 4. export: everything worked fine

 

Greetings,

dersmon

Re: "XMPFiles::GetXMP - No open file" on random files, on random occasions.

$
0
0

Hi dersmon,

    I tried locally by creating a similar setup to reproduce you issue but with no luck.

 

   I will be happy to work in your setup (if you can send or give me permisson or provide a simple setup as zip file or through VNC setup). If you can't give the setup due to any reason, could you give me steps required to setup the same on my end.

 

-Sunil

Re: "XMPFiles::GetXMP - No open file" on random files, on random occasions.

$
0
0

Hey,

 

I noticed in that the XMP_StringPtr is not cast correctly in case the process fails. I added

 

  qDebug()<<"filenamePtr:"<<  filenamePtr;

 

before trying to open the file. The result:

 

Importing XMP-Metadata from Image:  "D:/(...)03bx02x03.jpg"

filenamePtr:  @:@

Failed to open SXMPFile for  "D:/(...)03bx02x03.jpg"

Exception:  XMPFiles::GetXMP - No open file

Importing XMP-Metadata from Image:  "D:/(...)03bx02x04.jpg"

filenamePtr:  @:@

Failed to open SXMPFile for  "D:/(...)03bx02x04.jpg"

Exception:  XMPFiles::GetXMP - No open file

Importing XMP-Metadata from Image:  "D:/(...)03bx02x05.jpg" // first correct result

filenamePtr: D:/(...)03bx02x05.jpg

Importing XMP-Metadata from Image:  "D:/(...)03bx02x06.jpg"

filenamePtr: (...)03bx02x06.jpg

Importing XMP-Metadata from Image:  "D:/(...)03bx02x07.jpg"

filenamePtr:  D:/(...)03bx02x07.jpg

Importing XMP-Metadata from Image:  "D:/(...)03bx02x08.jpg"

filenamePtr:  D:/(...)03bx02x08.jpg

Using XMP how do I get the duration of an AVI file ?

$
0
0

Using XMP how do I get the duration of an AVI file or get the total frames and frame rate ?

Re: "XMPFiles::GetXMP - No open file" on random files, on random occasions.

$
0
0

Hi dersmon,

     Thanks for pointing it out. Here two things are clear

     1. There is nothing to do from XMP side, as OpenFile is not passed a correct path as char * / const char * / XMP_StringPtr . It's the application task to pass correct XMP_StringPtr (which is nothing but const char * refer XMP_Const.h)

 

     2. In application we are not able to get correct char * from QString. We are using

           "XMP_StringPtrfilenamePtr=(XMP_StringPtr)filePath.toUtf8();"

 

           to get char * which seems wrong. On the right hand side filePath.toUts8() returns the QByteArray but we need the pointer. I went through the QString documentation "http://qt-project.org/faq/answer/how_can_i_convert_a_qstring_to_char_a nd_vice_versa" to get the right way to convert char * from a QString.

 

           Could you please change the above line with the following lines?

 

           QByteArrayba=str1.toLocal8Bit();

          

           constchar*c_str_FileName=filePath.data();

           printf("str2: %s",c_str_FileName);    //this must print a correct path, if not, please refer the above page again.

     

          

           XMP_StringPtrfilenamePtr=c_str_FileName;  //althout c_str_FileName is const char * and can be use, but this line will avoid changing fileNamePtr in code

 

    I don't have qt setup, if the above change doesn't work, I will like to either work on your setup (if you allow) or to do a qt setup.

         


Metadata Panel - Drop-Down & Boolean

$
0
0

I recently built a Bridge MetaData panel; however, I was only able to create text fields. Does anyone know how to build drop-down and boolean fields? If you could provide an example of the type of code you used, that would be very helpful. Just a side note, I see drop-down menus in the IPTC metadata panel, but I can't find the xmp file - Maybe as a generic panel supplied by Adobe this isn't supplied. If anyone knows where I could find the file, that might also be helpful. Thank you!

 

LR

Re: "XMPFiles::GetXMP - No open file" on random files, on random occasions.

$
0
0

Hi Sunil,

 

that seems to be the solution. Again: Thank you very much! The final code:

 

 

QStringXmpParser::getXmpContent(QStringfilePath)

{
    try{
     XMP_VersionInfocoreVersion;
     SXMPMeta::GetVersionInfo(&coreVersion);
     std::stringxmpContent;
     XMP_OptionBitsopts=kXMPFiles_OpenForRead|kXMPFiles_OpenUsePacketScanning;
          QByteArrayba=filePath.toLocal8Bit();
     constchar*c_str_FileName=ba.data();
          XMP_StringPtrfilenamePtr=c_str_FileName;
          SXMPFilesmyfile;
          if(!myfile.OpenFile(filenamePtr,kXMP_UnknownFile,opts)){
                qDebug()<<"FailedtoopenSXMPFilefor"<<filePath;
        }
          if(!myfile.GetXMP(NULL,&xmpContent)){
                qDebug()<<"NoXMPdatainfile"<<filePath;
        }
   returnQString::fromStdString(xmpContent.c_str());
    }catch(XMP_Error&e){
          qDebug()<<"Exception:"<<e.GetErrMsg();
          return"";
    }
}

 

Cheers,

dersmon

Re: reading XMP includes strange characters

XMP Toolkit in an Illustrator Plugin

$
0
0

I'm running Mac OS X 10.8 Mountain Lion and Illustrator CC. I have a plugin built using XCode 4.6 and objective C++ (for UI elements) in which I need to read and possibly manipulate the XMP metadata of a linked image, normally tiff's.

 

I have successfully built and used the toolkit but I'm getting some strange behaviour, specifically random crashes (EXC_BAD_ACCESS) in unrelated object destructors after making calls to the toolkit. I have another post on the Illustrator SDK forums that describes the problems I'm having in more detail: http://forums.adobe.com/message/6306690#6306690

 

Does anyone have any idea what I'm doing wrong here? It's had me stumped for days I can provide more detailed information/code snippets if required, I'm just not in front of my Mac at the moment.

Re: reading XMP includes strange characters

$
0
0

Seems to be an error, not in the coding, but what is done with the result file (text dump of

tags).

 

The input PNG looks normal. It contains a UTF-8 copyright symbol, represented as 0xc2, 0xa9.

If you make an error in handling UTF-8, and treat it as ANSI, you will see © instead of just ©.

out.png looks to show the effect of treating these as DOS Ansi characters - line draw.

You need to watch carefully the encodings you are working with.

 

You could try opening the result file (text dump) in NotePad, having chosen encoding: UTF-8

before opening.

Viewing all 801 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>