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

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_and_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.

Re: XMP Toolkit in an Illustrator Plugin

$
0
0

Please ignore this post. The issue was in my own code (of course), I was stomping over some memory that wasn't mine to stomp on.

 

/idiot

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

$
0
0

Hi lafultz,

    duration is a structure type and stored in dynamic media namespace (XMP_NS_DM). It has two fields "values" and "scale" which are of string type. Please use the following code to check duration is present or not, and if present reading value and scale

 

--------------------------------------------Code to read duration -------------------------------------------------------------------------------------

std::string value, scale;

if (meta.DoesPropertyExist(kXMP_NS_DM, "duration")) {

                meta.GetStructField ( kXMP_NS_DM, "duration", kXMP_NS_DM, "value", &value, 0 );

                meta.GetStructField ( kXMP_NS_DM, "duration1", kXMP_NS_DM, "scale", &scale, 0 );

}

------------------------------------------------------------------------------------------ --------------------------------------------------------------------

 

 

    To read the frame rate (stored as videoFrameRate under dynamic media schema). Please use the following code to read it

----------------------------------------Code to read videoFrameRate--------------------------------------------------------------------------- ----

           if (meta.DoesPropertyExist(kXMP_NS_DM, "videoFrameRate")) {

                string videoframerate;

                meta.GetProperty ( kXMP_NS_DM, "videoFrameRate", &videoframerate, 0 );

            }

------------------------------------------------------------------------------------------ --------------------------------------------------------------------


Re: Metadata Panel - Drop-Down & Boolean

$
0
0

I'm Looking to do this as well.

Is the Following something that has to be done using Flex?

 

AdobeBridgeIPTCExtensionVlauelist.png

 

Is there a Code sample someplace?

 

This following, doesn't work to create that type of list for a Adobe Bridge custom panel.

 



<xmp_property name='Getty_Terms' category='external' label='$$$/Custom/Property/Getty_Terms=Getty Terms:' type='closedchoice'>

 




<xmp_choice raw_value="" label="(select choice)"/>







<xmp_choice raw_value="Royalty-free" label="Royalty-free"/>







<xmp_choice raw_value="Rights-managed" label="Rights-managed"/>







<xmp_choice raw_value="Royalty-free_Footage" label="Royalty-free_Footage"/>







<xmp_choice raw_value="Rights-ready_Footage" label="Rights-ready_Footage"/>






</xmp_property>

XMP SDK; CC FileInfoPanel Error and Bridge Custom Panel Localization usage

$
0
0

I'm getting the following error when trying to create a custom XMP FileInfoPanel using a localization file.

 

An error occured parsing 'properties.xml':

TypeError: Error #1083

 

 

If I don't Include the localization lines

$$$/Custom/Schema/

or

$$$/Custom/Property/ 

 

in the label=' <but Before;> Design_Element=Design Element:'

 

The File Info Panel works, but gives the label of; Design_Element=Design Element:

 

When making a corresponding copy for Adobe Bridge custom panel. The label reads correctly as: Design Element:.

 

If the Design_Element= part isn't included in the properties.xml for the File info panel, It displays correctly, but not at all for the Custom panel.

 

I assume then the rest of the Localization part has to be used.

 

I added the $$$/Custom/Schema/ and $$$/Custom/Property/  to the xmp_property and xmp_schema Labels as shown in the generic example file.

and set in the manifest.xml file with the line for; localizationFile = "<customPanel>" using our company name.

 

and copied all these lines into a file customPanel_en_US.dat in the folder loc. and renamed it to our CompanyName_en_US.dat.

 

And since all else is the same, for the Localization.. I'm not sure why i'm getting the error.

 

Also can anyone indicate in a manual and page number how the languages informaton works..

 

why $$$ ?

Or /Custom/ for instance are they needed.. or should they really say.

'$$$/Custom/CompanyName/Property/Design_Element=Design Element:'

 

or does it matter as long as $$$/ is used?

 

Any help in this matter would be appreatiated.

 

I'm Using windows 7 and Adobe Creative Cloud and I have Admin on my machine.

place the files at the following paths;

 

CS6 & CC with administrator privileges

Bridge

C:\Program Files\Adobe\Adobe Bridge CC (64 Bit)\Custom File Info Panels\4.0\custom

 

CS6 & CC  without administrator privileges

Info Panel

C:\Users\<User Name>\AppData\Roaming\Adobe\XMP\Custom File Info Panels\4.0\Panels

 

Flash Trust File

C:\Users\<user name>\AppData\Roaming\Macromedia\Flash Player\#Security\FlashPlayerTrust/Trust.cfg

 

The Trust file is named: Trust.cfg  (does it matter what its named? all i could find is it needs to be a .cfg file)

it has in it

C:\Users\<User Name>\AppData\Roaming\Adobe\XMP\Custom File Info Panels\4.0\panels

C:\Program Files\Adobe\Adobe Bridge CC (64 Bit)\Custom File Info Panels\4.0\panels

Re: Metadata Panel - Drop-Down & Boolean

Cannot build XMP-Toolkit-SDK-CC201306

$
0
0

Hi

 

Is this the correct forum to post this question?

 

I am using WIN 7 Professional 64 bit and Visual Studio 2010.

 

I have been trying to produce the Visual Studio project from the GenerateXMPToolkitSDK_win.bat file.

 

It fails repeatedly. It produces the VC10 directory.

 

When I open the solution in VS2010 it has no project files?

 

Note that I do not have Visual Studio running at the time of the build.

 

The following text is the message returned: -

 

 

G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build>REM l

ist of all projects to build

 

G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build>echo

"Update path environment that cmake can be found"

"Update path environment that cmake can be found"

 

G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build>REM s

et PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Syste

m32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tool

s\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\M

icrosoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.N

ET Web Pages\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Progra

m Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\CMake 2.8\bin;

G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build\..\..

\resources\tools\CMakeApp\win\bin

 

G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build>set P

ATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\

WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Bi

nn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Micro

soft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET W

eb Pages\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Fi

les (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\CMake 2.8\bin;G:\D

ownloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build\..\tools\

cmake\bin

 

G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build>echo

"================= Generate project for XMP build ================="

"================= Generate project for XMP build ================="

 

G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build>call

  1. cmake.bat 64 2010 WarningAsError Dynamic

 

G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build>echo

OFF

64 bit specified

"Generator VS 2010 specified"

"sensible warnings activated"

"Static build off"

CMakeFolder: "vc10/dynamic/windows_x64"

Generator used: Visual Studio 10 Win64

cmake ../../../. -G"Visual Studio 10 Win64" -DXMP_CMAKEFOLDER_NAME=""vc10/dynami

c/windows_x64"" -DCMAKE_CL_64=ON -DCMAKE_ARCH=x64 -DXMP_BUILD_WARNING_AS_ERROR=O

n -DXMP_BUILD_STATIC="Off"

-- The C compiler identification is MSVC 16.0.40219.1

-- The CXX compiler identification is MSVC 16.0.40219.1

-- Check for working C compiler using: Visual Studio 10 Win64

Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w

hile Visual Studio is running. Please exit all running instances of Visual Studi

o before continuing.

 

CMake needs to register Visual Studio macros when its macros file is updated or

when it detects that its current macros file is no longer registered with Visual

Studio.

 

-- Check for working C compiler using: Visual Studio 10 Win64 -- works

-- Detecting C compiler ABI info

Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w

hile Visual Studio is running. Please exit all running instances of Visual Studi

o before continuing.

 

CMake needs to register Visual Studio macros when its macros file is updated or

when it detects that its current macros file is no longer registered with Visual

Studio.

 

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler using: Visual Studio 10 Win64

Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w

hile Visual Studio is running. Please exit all running instances of Visual Studi

o before continuing.

 

CMake needs to register Visual Studio macros when its macros file is updated or

when it detects that its current macros file is no longer registered with Visual

Studio.

 

-- Check for working CXX compiler using: Visual Studio 10 Win64 -- works

-- Detecting CXX compiler ABI info

Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w

hile Visual Studio is running. Please exit all running instances of Visual Studi

o before continuing.

 

CMake needs to register Visual Studio macros when its macros file is updated or

when it detects that its current macros file is no longer registered with Visual

Studio.

 

-- Detecting CXX compiler ABI info - done

COMMON_BUILD_SHARED_DIR= G:/Downloads/Exif/XMP-Toolkit-SDK-CC-201306/XMP-Toolkit

-SDK-CC201306/build/../build/shared

-- ===========================================================================

--  XMPCore64

-- ===========================================================================

--  OUTPUT_DIR = G:/Downloads/Exif/XMP-Toolkit-SDK-CC-201306/XMP-Toolkit-SDK-CC2

01306/XMPCore/build/../../public/libraries/windows_x64/$(configuration)

-- ===========================================================================

--  XMPFiles64

-- ===========================================================================

--  OUTPUT_DIR = G:/Downloads/Exif/XMP-Toolkit-SDK-CC-201306/XMP-Toolkit-SDK-CC2

01306/XMPFiles/build/../../public/libraries/windows_x64/$(configuration)

-- ===========================================================================

--  XMPToolkitSDK

-- ===========================================================================

--  64 bit build is: 1

--  Static build is: Off

--  XMPToolkitSDK

--

--

--  Compiler:

--  CC=C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.e

xe

--  CXX=C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.

exe

-- ===========================================================================

-- Configuring done

Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w

hile Visual Studio is running. Please exit all running instances of Visual Studi

o before continuing.

 

CMake needs to register Visual Studio macros when its macros file is updated or

when it detects that its current macros file is no longer registered with Visual

Studio.

 

CMake Error at G:/Downloads/Exif/XMP-Toolkit-SDK-CC-201306/XMP-Toolkit-SDK-CC201

306/build/shared/SharedConfig_Common.cmake:132 (add_library):

  Cannot find source file:

 

    G:/Downloads/Exif/XMP-Toolkit-SDK-CC-201306/XMP-Toolkit-SDK-CC201306/XMPCore

/build/../../third-party/expat/lib/xmlparse.c

 

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp

  .hxx .in .txx

Call Stack (most recent call first):

  G:/Downloads/Exif/XMP-Toolkit-SDK-CC-201306/XMP-Toolkit-SDK-CC201306/XMPCore/b

uild/CMakeLists.txt:192 (AddLibraryAndDependencies)

 

 

CMake Warning:

  Manually-specified variables were not used by the project:

 

    CMAKE_ARCH

    XMP_BUILD_WARNING_AS_ERROR

 

 

-- Build files have been written to: G:/Downloads/Exif/XMP-Toolkit-SDK-CC-201306

/XMP-Toolkit-SDK-CC201306/build/vc10/dynamic/windows_x64

Failed XMP build cmake.

"Exiting CMakeUtils.bat"

Failed  build cmake.

"Exiting cmake.bat"

  1. Failed.

"Exiting cmake_all.bat"

CMake Build Failed.

Press any key to continue . . .

 

Can anyone hjelp me with this?

 

Thanks John

Re: Cannot build XMP-Toolkit-SDK-CC201306

$
0
0

Hi QPR John,

 

>Is this the correct forum to post this question?

Yes It is.

 

>Cannot find source file:

 

 

 

  >  G:/Downloads/Exif/XMP-Toolkit-SDK-CC-201306/XMP-Toolkit-SDK-CC201306/ XMPCore

 

/build/../../third-party/expat/lib/xmlparse.c

 

Looking at the error messages it is clear that the scripts are unable to find expat source file. You have to follow the instructions in “XMP Toolkit Programmer’s Guide” (present in <xmptoolkitroot/docs>)  section “Using the XMPToolkit SDK -Getting started “ to get the expat sources and others if not done already.

If you still see a different error after these changes, do let us know.

 

Thanks

Inder

Re: Cannot build XMP-Toolkit-SDK-CC201306

$
0
0

Inder

 

Thanks for your help so far, perhaps I should have read the "Getting Started Guide" first!

 

I have now been able to create all the VS solutions, when I open them in VS and I try to build the solution I get 45 warnings, samples of which include: -

 

Warning               1              warning C4800: 'XMP_OptionBits' : forcing value to bool 'true' or 'false' (performance warning)                G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\XMPCore\source\Parse RDF.cpp 458                1              XMPCore

Warning               2              warning C4267: 'argument' : conversion from 'size_t' to 'XMP_Uns32', possible loss of data                G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\XMPFiles\source\WXMP Files.cpp                204         1              XMPFiles

Warning               3              warning C4244: '=' : conversion from 'double' to 'float', possible loss of data                G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\source\XMP_ProgressT racker.cpp                134         1              XMPFiles

Warning               4              warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data                G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\source\XMP_ProgressT racker.cpp                142         1              XMPFiles

Warning               5              warning C4244: '=' : conversion from 'double' to 'float', possible loss of data                G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\source\XMP_ProgressT racker.cpp                149         1              XMPFiles

 

Similarly if I try to run the solution I get the following error : -

 

Unable to start program 'G:\Downloads\Exif\XMP-Toolkit-SDK-CC-201306\XMP-Toolkit-SDK-CC201306\build\vc10\static\w indows_x64\x64\Debug\ALL_BUILD'.    The system cannot find the file specified.

 

Can you help me with this? I hope it's not something obvious and I don't want to waste your time.

 

One problem I do have is that my programming background is VB.Net and not C++ !

 

Regards John

Re: Cannot build XMP-Toolkit-SDK-CC201306

$
0
0

John

 

Typically it takes the following steps to build and run the Toolkit Samples

  1. 1)      Setup the Environment/Dependencies  - copy expat, Zlib, cmake distributions
  2. 2)      Generate and build XMPToolkit Solutions- Successfully
  3. 3)      Generate and build the Samples - Successfully
  4. 4)      Run the samples

Assuming that you have reached step 3 without any error, you just need to go to the <xmpsdkroot>\samples\target\[windows|windows_x64]\[Debug|release] folder and run the command line sample applications you built in step 3. For info on how to use these sample applications refer “XMP Toolkit Programmer’s Guide” section “XMP Toolkit SDK Overview-> The XMP libraries -> Sample Code and Tools”

 

Hope this helps

Inder


Re: Cannot build XMP-Toolkit-SDK-CC201306

$
0
0

Hi Again Inder.

 

Thankyou for your help again.

 

I have a project in VB.Net that I have produced to caption JPEG's via VB code and Photoshop CS5.1 directly. Primarily it is used to caption images taken during football matches and then they are FTP'd to the agency I work for.

 

I have used the ScriptingListenerVB plugin to retrieve and adapt code to perform this.

 

I wanted to be able to read and write directly to a JPEG without relying on Photoshop, I have used several functions in VB.Net 'Get' and 'Set' Query to read and write metadata to/from JPEG's. What I have tried to do is produce XML/XMP files without any real success, I can't reproduce the xml files in the same format as is used in the "XMP" format, I guess that it's a combination of my lack of knowledge and being unable to find a source/forums to get help. That is primarily why I looked at the toolkit, however my knowledge of C++ is very limited.

 

I have two last questions before I give up: -

 

  1. There are code converters that will convert C++ to VB. Is it in the realms of possibility to convert the toolkit to VB?
  2. Do you know where I can get some additional help regarding producing the xml/p files using VB.Net?

 

Many Thanks

 

John

Reading XMP data using VB.Net does not include line spaces or carraige returns?

$
0
0

I use VB.Net for my programming.

 

Using various XMLreaders I can extract data from various elements from an exported XMP file.

 

I am having problems with converting "&#xA" to a line feed in VB.Net and displaying the contents in a textbox.

 

Put simply the text is shown without any line spaces or carriage returns. (The "&#xA" is not shown in the text displayed)

 

The same data displayed in a message box show the line feeds/carriage returns?

 

I have scoured several forums to try to answer this problem, can anyone help?

 

Thanks John

Open file error when filename contains particular characters

$
0
0

In windows platform, when i try to open a file when the filename contains uncommon chars, such as ’ (different than ' ), the call to OpenFile returns false.

The filename is a wchar_t* , and I've tried any flavour of conversion to char* using WideCharToMultiByte, with no success.

 

Any hint?

Does the toolkit (5.5.0) support extended character set ?

Re: Reading XMP data using VB.Net does not include line spaces or carraige returns?

$
0
0

Solution found - it was a problem with the type of textbox I was using in VB.Net, should have used a "RichTextbox". Normal textboxes in VB.Net will not recognise line feeds as used in xml documents.

XMP folder location on MAC

$
0
0

I am trying to add Custom Panel within Adobe Bridge CC on Mac OS 10.9.2.  does any one know the location of the XMP folder. 

Viewing all 801 articles
Browse latest View live


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