XMPMeta vs Metadata

After doing a XMPMeta.serialize() and Metadata.serialize() comparison, it's
obvious that Metadata is returning more than just the explicit XMP data in a
file. It is deriving/computing other fields (EXIF properties, for instance) and
using that to construct a more complete XMP view of a file's metadata.
photoshop:ColorMode is one example of a field that Metadata will contain but
XMPMeta does not (at least when the image file is a generic jpg).
While I do understand the reasons behind this, it limits the usefulness of
XMPMeta in Ps or Id. For instance, there is no way to determine (via XMPMeta)
which files in folder are Portrait or Landscape orientation because the
necessary tiff properties will probably not be available. And this is not an
uncommon thing to want to do in PS.
What is really needed is to have Metadata as a part of the core ESTK libraries
in addition to XMPMeta. As it presently stands, I have to use BridgeTalk (to
call Bridge) to get all of a file's metadata in Photoshop. And, until CS4, I had
to deal with extracting the metadata I needed from the serialized XMP in my own
code.
Is having the Metadata class available to Ps and Id as a part of ESTK an
unreasonable thing to want or an impractical thing to implement?
-X

X,
You should probably ask this on the Photoshop and InDesign scripting forums.
Thanks,
David

Similar Messages

  • Is there a way to extract an image file metadata?

    I know this isn't specific to PS but hope there's an answer here.
    I'm transcribing some of the metadata from image files to build a simple catalog.  Included are things like dimensions, resolution, and photo date.  Is there a way to extract this data other than manually?
    Thanks
    Tom

    A Photoshop script can with ease.
    // This script is supplied as is. It is provided as freeware.
    // The author accepts no liability for any problems arising from its use.
    <javascriptresource>
    <about>$$$/JavaScripts/metadata/About=JJMack's pdf metadata.^r^rCopyright 2009 Mouseprints.^r^rJJMack's Script.^rNOTE:Copy Document metadata to a text file in same folder with same filename!</about>
    </javascriptresource>
    //<category>JJMack's Script</category>
    // enable double-clicking from Mac Finder or Windows Explorer
    #target photoshop // this command only works in Photoshop CS2 and higher
    // bring application forward for double-click events
    app.bringToFront();
    // ensure at least one document open
    if (!documents.length) {
              alert('There are no documents open.', 'No Document');
    // if at least one document exists, then proceed
    else {
              main();
    // main - main function
    function main() {
              try {
                      // remember users Ruler avd Type Units and set ours
                        var strtRulerUnits = app.preferences.rulerUnits;
                        var strtTypeUnits = app.preferences.typeUnits;
                        app.preferences.rulerUnits = Units.PIXELS;
                         app.preferences.typeUnits = TypeUnits.PIXELS;
                        xml = app.activeDocument.xmpMetadata.rawData;
                    //writeTXT(xml);
                        //alert ("length of metadata = " + xml.length);
                        //alert (xml);
                        xmpdatastart = xml.indexOf("<x:xmpmeta");
                        xmpdataend = xml.indexOf("</x:xmpmeta>") +  "</x:xmpmeta>".length;
                        //alert ("xmpdatastart = " + xmpdatastart + " xmpdatalength = " + xmpdatalength );
                        xmpdata = xml.substr(xmpdatastart, xmpdataend );
                        writeTXT(xmpdata);
                        var mySourceFilePath = activeDocument.fullName.path + "/";
                        alert("Operation Complete! Metadata exported to: " + mySourceFilePath.toString().match(/([^\.]+)/)[1] + app.activeDocument.name.match(/([^\.]+)/)[1] + ".txt");
                        // break up into segments and make text layers
                        n = 1
                        for (var i = 0; i < xmpdataend - xmpdatastart; ){
                                  datalength = xmpdata.indexOf("</rdf:Description>") +  "</rdf:Description>".length;
                                  //alert ("datalength = " + datalength );
                                  if (datalength == 17) { datalength = 34;}
                                  data = xmpdata.substr(0, datalength);
                                  endofdata = xmpdata.indexOf("</x:xmpmeta>") +  "</x:xmpmeta>".length;
                                  xmpdata = xmpdata.substr(datalength, endofdata);
                                  i = i + datalength;
                                  // addTextLayer(data, n);
                                    alert (data);
                                  n = n + 1;
                        app.preferences.rulerUnits = strtRulerUnits;
                        app.preferences.typeUnits = strtTypeUnits;
              // display error message if something goes wrong
              catch(e) { alert(e + ': on line ' + e.line, 'Script Error', true); }
    function addTextLayer(textdata, n) {
            /* textX and TextY positions text placement 0 and 0 Top Left corner of image in pixels          */
              var textX = 0;
              var textY = 0;
              /* Internal Photoshop Text font name                                                                      */
            var fontName = "ArialMT";
              var fontName = "TimesNewRomanPSMT";
              //var fontName = "Tahoma";
              var fontSize = 6;
              /* Text Color                                                                                                    */
              textColor = new SolidColor;
              textColor.rgb.red = 255;
              textColor.rgb.green = 255;
              textColor.rgb.blue = 255;
              text_layer = app.activeDocument.artLayers.add();                                        // Add a Layer
              text_layer.kind = LayerKind.TEXT;                                                            // Make Layer a Text Layer
              text_layer.textItem.color = textColor;                                                            // set text layer color
              text_layer.blendMode = BlendMode.NORMAL                                                            // blend mode
              text_layer.textItem.font = fontName;                                                            // set text font
              text_layer.textItem.size = fontSize;                                                            // set text font Size
              text_layer.textItem.position = Array(textX, (textY + (fontSize * 3)) );                    // set text layers position in and down for fontsize
              //text_layer.textItem.position = Array(textX, (textY + (fontSize * 3 * n)) );          // set text layers position in and down for fontsize
              text_layer.textItem.contents = textdata;                                                  // set text layers text
    // Write TXT file
        function writeTXT(data) {
              // Use this to export metadata file to same directory where this file is located
              var mySourceFilePath = activeDocument.fullName.path + "/";
              // create a reference to a file for output
              var TXTFile = new File(mySourceFilePath.toString().match(/([^\.]+)/)[1] + app.activeDocument.name.match(/([^\.]+)/)[1] + ".txt");
            try {
                if(TXTFile.exists) {
                    TXTFile.open ("e");
                    TXTFile.seek (0,2);      // Move to EOF
                } else {
                TXTFile.open ("w");          // Add unicode marker if we change to XML file format for this log file
            TXTFile.encoding = "UTF8";       // set UTF8
            TXTFile.write(data);
            TXTFile.close();
            } catch (e) {
                alert(e);
            } finally {
            return;
    Outputs an XML file that looks like this:
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        ">
       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
          <rdf:Description rdf:about=""
                xmlns:dc="http://purl.org/dc/elements/1.1/">
             <dc:format>image/tiff</dc:format>
             <dc:creator>
                <rdf:Seq>
                   <rdf:li>Pam McAssey</rdf:li>
                </rdf:Seq>
             </dc:creator>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:aux="http://ns.adobe.com/exif/1.0/aux/">
             <aux:SerialNumber>720600641</aux:SerialNumber>
             <aux:LensInfo>24/1 70/1 0/0 0/0</aux:LensInfo>
             <aux:Lens>EF24-70mm f/2.8L USM</aux:Lens>
             <aux:LensID>230</aux:LensID>
             <aux:ImageNumber>0</aux:ImageNumber>
             <aux:ApproximateFocusDistance>122/100</aux:ApproximateFocusDistance>
             <aux:FlashCompensation>0/1</aux:FlashCompensation>
             <aux:Firmware>1.0.6</aux:Firmware>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmp="http://ns.adobe.com/xap/1.0/">
             <xmp:ModifyDate>2012-12-19T11:23:49-05:00</xmp:ModifyDate>
             <xmp:CreateDate>2012-12-16T17:11:53</xmp:CreateDate>
             <xmp:Rating>0</xmp:Rating>
             <xmp:MetadataDate>2012-12-19T11:23:49-05:00</xmp:MetadataDate>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
             <photoshop:DateCreated>2012-12-16T17:11:53</photoshop:DateCreated>
             <photoshop:ColorMode>3</photoshop:ColorMode>
             <photoshop:ICCProfile>ProPhoto RGB</photoshop:ICCProfile>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
                xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
                xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#">
             <xmpMM:DocumentID>xmp.did:b13179a4-0983-a649-a532-0d90ea6feea5</xmpMM:DocumentID>
             <xmpMM:OriginalDocumentID>E634097DE11761C5824C1873DDBDEDDD</xmpMM:OriginalDocumentID>
             <xmpMM:InstanceID>xmp.iid:b13179a4-0983-a649-a532-0d90ea6feea5</xmpMM:InstanceID>
             <xmpMM:History>
                <rdf:Seq>
                   <rdf:li rdf:parseType="Resource">
                      <stEvt:action>saved</stEvt:action>
                      <stEvt:instanceID>xmp.iid:9d0e25ce-f732-d74a-9631-086fc6151324</stEvt:instanceID>
                      <stEvt:when>2012-12-16T16:11:44-05:00</stEvt:when>
                      <stEvt:softwareAgent>Adobe Photoshop Camera Raw 7.3 (Windows)</stEvt:softwareAgent>
                      <stEvt:changed>/metadata</stEvt:changed>
                   </rdf:li>
                   <rdf:li rdf:parseType="Resource">
                      <stEvt:action>saved</stEvt:action>
                      <stEvt:instanceID>xmp.iid:0816d1f7-2bb5-e344-806a-6da92a4c8540</stEvt:instanceID>
                      <stEvt:when>2012-12-16T16:13:18-05:00</stEvt:when>
                      <stEvt:softwareAgent>Adobe Photoshop Camera Raw 7.3 (Windows)</stEvt:softwareAgent>
                      <stEvt:changed>/metadata</stEvt:changed>
                   </rdf:li>
                   <rdf:li rdf:parseType="Resource">
                      <stEvt:action>derived</stEvt:action>
                      <stEvt:parameters>converted from image/x-canon-cr2 to image/tiff</stEvt:parameters>
                   </rdf:li>
                   <rdf:li rdf:parseType="Resource">
                      <stEvt:action>saved</stEvt:action>
                      <stEvt:instanceID>xmp.iid:b13179a4-0983-a649-a532-0d90ea6feea5</stEvt:instanceID>
                      <stEvt:when>2012-12-19T11:23:49-05:00</stEvt:when>
                      <stEvt:softwareAgent>Adobe Photoshop Camera Raw 7.3 (Windows)</stEvt:softwareAgent>
                      <stEvt:changed>/</stEvt:changed>
                   </rdf:li>
                </rdf:Seq>
             </xmpMM:History>
             <xmpMM:DerivedFrom rdf:parseType="Resource">
                <stRef:instanceID>xmp.iid:0816d1f7-2bb5-e344-806a-6da92a4c8540</stRef:instanceID>
                <stRef:documentID>E634097DE11761C5824C1873DDBDEDDD</stRef:documentID>
                <stRef:originalDocumentID>E634097DE11761C5824C1873DDBDEDDD</stRef:originalDocumentID>
             </xmpMM:DerivedFrom>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/">
             <crs:RawFileName>_S1H4635.CR2</crs:RawFileName>
             <crs:Version>7.3</crs:Version>
             <crs:ProcessVersion>6.7</crs:ProcessVersion>
             <crs:WhiteBalance>As Shot</crs:WhiteBalance>
             <crs:Temperature>5950</crs:Temperature>
             <crs:Tint>+46</crs:Tint>
             <crs:Saturation>0</crs:Saturation>
             <crs:Sharpness>25</crs:Sharpness>
             <crs:LuminanceSmoothing>0</crs:LuminanceSmoothing>
             <crs:ColorNoiseReduction>25</crs:ColorNoiseReduction>
             <crs:VignetteAmount>0</crs:VignetteAmount>
             <crs:ShadowTint>0</crs:ShadowTint>
             <crs:RedHue>0</crs:RedHue>
             <crs:RedSaturation>0</crs:RedSaturation>
             <crs:GreenHue>0</crs:GreenHue>
             <crs:GreenSaturation>0</crs:GreenSaturation>
             <crs:BlueHue>0</crs:BlueHue>
             <crs:BlueSaturation>0</crs:BlueSaturation>
             <crs:Vibrance>0</crs:Vibrance>
             <crs:HueAdjustmentRed>0</crs:HueAdjustmentRed>
             <crs:HueAdjustmentOrange>0</crs:HueAdjustmentOrange>
             <crs:HueAdjustmentYellow>0</crs:HueAdjustmentYellow>
             <crs:HueAdjustmentGreen>0</crs:HueAdjustmentGreen>
             <crs:HueAdjustmentAqua>0</crs:HueAdjustmentAqua>
             <crs:HueAdjustmentBlue>0</crs:HueAdjustmentBlue>
             <crs:HueAdjustmentPurple>0</crs:HueAdjustmentPurple>
             <crs:HueAdjustmentMagenta>0</crs:HueAdjustmentMagenta>
             <crs:SaturationAdjustmentRed>0</crs:SaturationAdjustmentRed>
             <crs:SaturationAdjustmentOrange>0</crs:SaturationAdjustmentOrange>
             <crs:SaturationAdjustmentYellow>0</crs:SaturationAdjustmentYellow>
             <crs:SaturationAdjustmentGreen>0</crs:SaturationAdjustmentGreen>
             <crs:SaturationAdjustmentAqua>0</crs:SaturationAdjustmentAqua>
             <crs:SaturationAdjustmentBlue>0</crs:SaturationAdjustmentBlue>
             <crs:SaturationAdjustmentPurple>0</crs:SaturationAdjustmentPurple>
             <crs:SaturationAdjustmentMagenta>0</crs:SaturationAdjustmentMagenta>
             <crs:LuminanceAdjustmentRed>0</crs:LuminanceAdjustmentRed>
             <crs:LuminanceAdjustmentOrange>0</crs:LuminanceAdjustmentOrange>
             <crs:LuminanceAdjustmentYellow>0</crs:LuminanceAdjustmentYellow>
             <crs:LuminanceAdjustmentGreen>0</crs:LuminanceAdjustmentGreen>
             <crs:LuminanceAdjustmentAqua>0</crs:LuminanceAdjustmentAqua>
             <crs:LuminanceAdjustmentBlue>0</crs:LuminanceAdjustmentBlue>
             <crs:LuminanceAdjustmentPurple>0</crs:LuminanceAdjustmentPurple>
             <crs:LuminanceAdjustmentMagenta>0</crs:LuminanceAdjustmentMagenta>
             <crs:SplitToningShadowHue>0</crs:SplitToningShadowHue>
             <crs:SplitToningShadowSaturation>0</crs:SplitToningShadowSaturation>
             <crs:SplitToningHighlightHue>0</crs:SplitToningHighlightHue>
             <crs:SplitToningHighlightSaturation>0</crs:SplitToningHighlightSaturation>
             <crs:SplitToningBalance>0</crs:SplitToningBalance>
             <crs:ParametricShadows>0</crs:ParametricShadows>
             <crs:ParametricDarks>0</crs:ParametricDarks>
             <crs:ParametricLights>0</crs:ParametricLights>
             <crs:ParametricHighlights>0</crs:ParametricHighlights>
             <crs:ParametricShadowSplit>25</crs:ParametricShadowSplit>
             <crs:ParametricMidtoneSplit>50</crs:ParametricMidtoneSplit>
             <crs:ParametricHighlightSplit>75</crs:ParametricHighlightSplit>
             <crs:SharpenRadius>+1.0</crs:SharpenRadius>
             <crs:SharpenDetail>25</crs:SharpenDetail>
             <crs:SharpenEdgeMasking>0</crs:SharpenEdgeMasking>
             <crs:PostCropVignetteAmount>0</crs:PostCropVignetteAmount>
             <crs:GrainAmount>0</crs:GrainAmount>
             <crs:ColorNoiseReductionDetail>50</crs:ColorNoiseReductionDetail>
             <crs:LensProfileEnable>0</crs:LensProfileEnable>
             <crs:LensManualDistortionAmount>0</crs:LensManualDistortionAmount>
             <crs:PerspectiveVertical>0</crs:PerspectiveVertical>
             <crs:PerspectiveHorizontal>0</crs:PerspectiveHorizontal>
             <crs:PerspectiveRotate>0.0</crs:PerspectiveRotate>
             <crs:PerspectiveScale>100</crs:PerspectiveScale>
             <crs:AutoLateralCA>0</crs:AutoLateralCA>
             <crs:Exposure2012>-1.30</crs:Exposure2012>
             <crs:Contrast2012>-25</crs:Contrast2012>
             <crs:Highlights2012>0</crs:Highlights2012>
             <crs:Shadows2012>0</crs:Shadows2012>
             <crs:Whites2012>+2</crs:Whites2012>
             <crs:Blacks2012>-9</crs:Blacks2012>
             <crs:Clarity2012>0</crs:Clarity2012>
             <crs:DefringePurpleAmount>0</crs:DefringePurpleAmount>
             <crs:DefringePurpleHueLo>30</crs:DefringePurpleHueLo>
             <crs:DefringePurpleHueHi>70</crs:DefringePurpleHueHi>
             <crs:DefringeGreenAmount>0</crs:DefringeGreenAmount>
             <crs:DefringeGreenHueLo>40</crs:DefringeGreenHueLo>
             <crs:DefringeGreenHueHi>60</crs:DefringeGreenHueHi>
             <crs:ConvertToGrayscale>False</crs:ConvertToGrayscale>
             <crs:ToneCurveName2012>Linear</crs:ToneCurveName2012>
             <crs:ToneCurvePV2012>
                <rdf:Seq>
                   <rdf:li>0, 0</rdf:li>
                   <rdf:li>255, 255</rdf:li>
                </rdf:Seq>
             </crs:ToneCurvePV2012>
             <crs:ToneCurvePV2012Red>
                <rdf:Seq>
                   <rdf:li>0, 0</rdf:li>
                   <rdf:li>255, 255</rdf:li>
                </rdf:Seq>
             </crs:ToneCurvePV2012Red>
             <crs:ToneCurvePV2012Green>
                <rdf:Seq>
                   <rdf:li>0, 0</rdf:li>
                   <rdf:li>255, 255</rdf:li>
                </rdf:Seq>
             </crs:ToneCurvePV2012Green>
             <crs:ToneCurvePV2012Blue>
                <rdf:Seq>
                   <rdf:li>0, 0</rdf:li>
                   <rdf:li>255, 255</rdf:li>
                </rdf:Seq>
             </crs:ToneCurvePV2012Blue>
             <crs:CameraProfile>Adobe Standard</crs:CameraProfile>
             <crs:CameraProfileDigest>3CE8523BCEA625D0F0ABABADE3BCC281</crs:CameraProfileDigest>
             <crs:LensProfileSetup>LensDefaults</crs:LensProfileSetup>
             <crs:HasSettings>True</crs:HasSettings>
             <crs:HasCrop>False</crs:HasCrop>
             <crs:AlreadyApplied>True</crs:AlreadyApplied>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
             <tiff:XResolution>240/1</tiff:XResolution>
             <tiff:YResolution>240/1</tiff:YResolution>
             <tiff:ResolutionUnit>2</tiff:ResolutionUnit>
             <tiff:Make>Canon</tiff:Make>
             <tiff:Model>Canon EOS-1D Mark IV</tiff:Model>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:exif="http://ns.adobe.com/exif/1.0/">
             <exif:ExifVersion>0221</exif:ExifVersion>
             <exif:PixelXDimension>4896</exif:PixelXDimension>
             <exif:PixelYDimension>3264</exif:PixelYDimension>
             <exif:DateTimeOriginal>2012-12-16T17:11:53</exif:DateTimeOriginal>
             <exif:ExposureTime>1/30</exif:ExposureTime>
             <exif:FNumber>28/10</exif:FNumber>
             <exif:ExposureProgram>2</exif:ExposureProgram>
             <exif:ISOSpeedRatings>
                <rdf:Seq>
                   <rdf:li>3200</rdf:li>
                </rdf:Seq>
             </exif:ISOSpeedRatings>
             <exif:ShutterSpeedValue>4906891/1000000</exif:ShutterSpeedValue>
             <exif:ApertureValue>2970854/1000000</exif:ApertureValue>
             <exif:ExposureBiasValue>0/1</exif:ExposureBiasValue>
             <exif:MaxApertureValue>3/1</exif:MaxApertureValue>
             <exif:MeteringMode>5</exif:MeteringMode>
             <exif:Flash rdf:parseType="Resource">
                <exif:Fired>False</exif:Fired>
                <exif:Return>0</exif:Return>
                <exif:Mode>2</exif:Mode>
                <exif:Function>False</exif:Function>
                <exif:RedEyeMode>False</exif:RedEyeMode>
             </exif:Flash>
             <exif:FocalLength>64/1</exif:FocalLength>
             <exif:FocalPlaneXResolution>4896000/1290</exif:FocalPlaneXResolution>
             <exif:FocalPlaneYResolution>3264000/836</exif:FocalPlaneYResolution>
             <exif:FocalPlaneResolutionUnit>2</exif:FocalPlaneResolutionUnit>
             <exif:CustomRendered>0</exif:CustomRendered>
             <exif:ExposureMode>0</exif:ExposureMode>
             <exif:WhiteBalance>0</exif:WhiteBalance>
             <exif:SceneCaptureType>0</exif:SceneCaptureType>
             <exif:SubSecTime>00</exif:SubSecTime>
             <exif:SubSecTimeOriginal>00</exif:SubSecTimeOriginal>
             <exif:SubSecTimeDigitized>00</exif:SubSecTimeDigitized>
             <exif:SerialNumber>720600641</exif:SerialNumber>
             <exif:LensInfo>
                <rdf:Seq>
                   <rdf:li>24/1</rdf:li>
                </rdf:Seq>
             </exif:LensInfo>
             <exif:Lens>EF24-70mm f/2.8L USM</exif:Lens>
          </rdf:Description>
       </rdf:RDF>
    </x:xmpmeta>
                                                       <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        ">
       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
          <rdf:Description rdf:about=""
                xmlns:dc="http://purl.org/dc/elements/1.1/">
             <dc:format>image/tiff</dc:format>
             <dc:creator>
                <rdf:Seq>
                   <rdf:li>Pam McAssey</rdf:li>
                </rdf:Seq>
             </dc:creator>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:aux="http://ns.adobe.com/exif/1.0/aux/">
             <aux:SerialNumber>720600641</aux:SerialNumber>
             <aux:LensInfo>24/1 70/1 0/0 0/0</aux:LensInfo>
             <aux:Lens>EF24-70mm f/2.8L USM</aux:Lens>
             <aux:LensID>230</aux:LensID>
             <aux:ImageNumber>0</aux:ImageNumber>
             <aux:ApproximateFocusDistance>122/100</aux:ApproximateFocusDistance>
             <aux:FlashCompensation>0/1</aux:FlashCompensation>
             <aux:Firmware>1.0.6</aux:Firmware>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmp="http://ns.adobe.com/xap/1.0/">
             <xmp:ModifyDate>2012-12-19T11:23:49-05:00</xmp:ModifyDate>
             <xmp:CreateDate>2012-12-16T17:11:53</xmp:CreateDate>
             <xmp:Rating>0</xmp:Rating>
             <xmp:MetadataDate>2012-12-19T11:23:49-05:00</xmp:MetadataDate>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
             <photoshop:DateCreated>2012-12-16T17:11:53</photoshop:DateCreated>
             <photoshop:ColorMode>3</photoshop:ColorMode>
             <photoshop:ICCProfile>ProPhoto RGB</photoshop:ICCProfile>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
                xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
                xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#">
             <xmpMM:DocumentID>xmp.did:b13179a4-0983-a649-a532-0d90ea6feea5</xmpMM:DocumentID>
             <xmpMM:OriginalDocumentID>E634097DE11761C5824C1873DDBDEDDD</xmpMM:OriginalDocumentID>
             <xmpMM:InstanceID>xmp.iid:b13179a4-0983-a649-a532-0d90ea6feea5</xmpMM:InstanceID>
             <xmpMM:History>
                <rdf:Seq>
                   <rdf:li rdf:parseType="Resource">
                      <stEvt:action>saved</stEvt:action>
                      <stEvt:instanceID>xmp.iid:9d0e25ce-f732-d74a-9631-086fc6151324</stEvt:instanceID>
                      <stEvt:when>2012-12-16T16:11:44-05:00</stEvt:when>
                      <stEvt:softwareAgent>Adobe Photoshop Camera Raw 7.3 (Windows)</stEvt:softwareAgent>
                      <stEvt:changed>/metadata</stEvt:changed>
                   </rdf:li>
                   <rdf:li rdf:parseType="Resource">
                      <stEvt:action>saved</stEvt:action>
                      <stEvt:instanceID>xmp.iid:0816d1f7-2bb5-e344-806a-6da92a4c8540</stEvt:instanceID>
                      <stEvt:when>2012-12-16T16:13:18-05:00</stEvt:when>
                      <stEvt:softwareAgent>Adobe Photoshop Camera Raw 7.3 (Windows)</stEvt:softwareAgent>
                      <stEvt:changed>/metadata</stEvt:changed>
                   </rdf:li>
                   <rdf:li rdf:parseType="Resource">
                      <stEvt:action>derived</stEvt:action>
                      <stEvt:parameters>converted from image/x-canon-cr2 to image/tiff</stEvt:parameters>
                   </rdf:li>
                   <rdf:li rdf:parseType="Resource">
                      <stEvt:action>saved</stEvt:action>
                      <stEvt:instanceID>xmp.iid:b13179a4-0983-a649-a532-0d90ea6feea5</stEvt:instanceID>
                      <stEvt:when>2012-12-19T11:23:49-05:00</stEvt:when>
                      <stEvt:softwareAgent>Adobe Photoshop Camera Raw 7.3 (Windows)</stEvt:softwareAgent>
                      <stEvt:changed>/</stEvt:changed>
                   </rdf:li>
                </rdf:Seq>
             </xmpMM:History>
             <xmpMM:DerivedFrom rdf:parseType="Resource">
                <stRef:instanceID>xmp.iid:0816d1f7-2bb5-e344-806a-6da92a4c8540</stRef:instanceID>
                <stRef:documentID>E634097DE11761C5824C1873DDBDEDDD</stRef:documentID>
                <stRef:originalDocumentID>E634097DE11761C5824C1873DDBDEDDD</stRef:originalDocumentID>
             </xmpMM:DerivedFrom>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/">
             <crs:RawFileName>_S1H4635.CR2</crs:RawFileName>
             <crs:Version>7.3</crs:Version>
             <crs:ProcessVersion>6.7</crs:ProcessVersion>
             <crs:WhiteBalance>As Shot</crs:WhiteBalance>
             <crs:Temperature>5950</crs:Temperature>
             <crs:Tint>+46</crs:Tint>
             <crs:Saturation>0</crs:Saturation>
             <crs:Sharpness>25</crs:Sharpness>
             <crs:LuminanceSmoothing>0</crs:LuminanceSmoothing>
             <crs:ColorNoiseReduction>25</crs:ColorNoiseReduction>
             <crs:VignetteAmount>0</crs:VignetteAmount>
             <crs:ShadowTint>0</crs:ShadowTint>
             <crs:RedHue>0</crs:RedHue>
             <crs:RedSaturation>0</crs:RedSaturation>
             <crs:GreenHue>0</crs:GreenHue>
             <crs:GreenSaturation>0</crs:GreenSaturation>
             <crs:BlueHue>0</crs:BlueHue>
             <crs:BlueSaturation>0</crs:BlueSaturation>
             <crs:Vibrance>0</crs:Vibrance>
             <crs:HueAdjustmentRed>0</crs:HueAdjustmentRed>
             <crs:HueAdjustmentOrange>0</crs:HueAdjustmentOrange>
             <crs:HueAdjustmentYellow>0</crs:HueAdjustmentYellow>
             <crs:HueAdjustmentGreen>0</crs:HueAdjustmentGreen>
             <crs:HueAdjustmentAqua>0</crs:HueAdjustmentAqua>
             <crs:HueAdjustmentBlue>0</crs:HueAdjustmentBlue>
             <crs:HueAdjustmentPurple>0</crs:HueAdjustmentPurple>
             <crs:HueAdjustmentMagenta>0</crs:HueAdjustmentMagenta>
             <crs:SaturationAdjustmentRed>0</crs:SaturationAdjustmentRed>
             <crs:SaturationAdjustmentOrange>0</crs:SaturationAdjustmentOrange>
             <crs:SaturationAdjustmentYellow>0</crs:SaturationAdjustmentYellow>
             <crs:SaturationAdjustmentGreen>0</crs:SaturationAdjustmentGreen>
             <crs:SaturationAdjustmentAqua>0</crs:SaturationAdjustmentAqua>
             <crs:SaturationAdjustmentBlue>0</crs:SaturationAdjustmentBlue>
             <crs:SaturationAdjustmentPurple>0</crs:SaturationAdjustmentPurple>
             <crs:SaturationAdjustmentMagenta>0</crs:SaturationAdjustmentMagenta>
             <crs:LuminanceAdjustmentRed>0</crs:LuminanceAdjustmentRed>
             <crs:LuminanceAdjustmentOrange>0</crs:LuminanceAdjustmentOrange>
             <crs:LuminanceAdjustmentYellow>0</crs:LuminanceAdjustmentYellow>
             <crs:LuminanceAdjustmentGreen>0</crs:LuminanceAdjustmentGreen>
             <crs:LuminanceAdjustmentAqua>0</crs:LuminanceAdjustmentAqua>
             <crs:LuminanceAdjustmentBlue>0</crs:LuminanceAdjustmentBlue>
             <crs:LuminanceAdjustmentPurple>0</crs:LuminanceAdjustmentPurple>
             <crs:LuminanceAdjustmentMagenta>0</crs:LuminanceAdjustmentMagenta>
             <crs:SplitToningShadowHue>0</crs:SplitToningShadowHue>
             <crs:SplitToningShadowSaturation>0</crs:SplitToningShadowSaturation>
             <crs:SplitToningHighlightHue>0</crs:SplitToningHighlightHue>
             <crs:SplitToningHighlightSaturation>0</crs:SplitToningHighlightSaturation>
             <crs:SplitToningBalance>0</crs:SplitToningBalance>
             <crs:ParametricShadows>0</crs:ParametricShadows>
             <crs:ParametricDarks>0</crs:ParametricDarks>
             <crs:ParametricLights>0</crs:ParametricLights>
             <crs:ParametricHighlights>0</crs:ParametricHighlights>
             <crs:ParametricShadowSplit>25</crs:ParametricShadowSplit>
             <crs:ParametricMidtoneSplit>50</crs:ParametricMidtoneSplit>
             <crs:ParametricHighlightSplit>75</crs:ParametricHighlightSplit>
             <crs:SharpenRadius>+1.0</crs:SharpenRadius>
             <crs:SharpenDetail>25</crs:SharpenDetail>
             <crs:SharpenEdgeMasking>0</crs:SharpenEdgeMasking>
             <crs:PostCropVignetteAmount>0</crs:PostCropVignetteAmount>
             <crs:GrainAmount>0</crs:GrainAmount>
             <crs:ColorNoiseReductionDetail>50</crs:ColorNoiseReductionDetail>
             <crs:LensProfileEnable>0</crs:LensProfileEnable>
             <crs:LensManualDistortionAmount>0</crs:LensManualDistortionAmount>
             <crs:PerspectiveVertical>0</crs:PerspectiveVertical>
             <crs:PerspectiveHorizontal>0</crs:PerspectiveHorizontal>
             <crs:PerspectiveRotate>0.0</crs:PerspectiveRotate>
             <crs:PerspectiveScale>100</crs:PerspectiveScale>
             <crs:AutoLateralCA>0</crs:AutoLateralCA>
             <crs:Exposure2012>-1.30</crs:Exposure2012>
             <crs:Contrast2012>-25</crs:Contrast2012>
             <crs:Highlights2012>0</crs:Highlights2012>
             <crs:Shadows2012>0</crs:Shadows2012>
             <crs:Whites2012>+2</crs:Whites2012>
             <crs:Blacks2012>-9</crs:Blacks2012>
             <crs:Clarity2012>0</crs:Clarity2012>
             <crs:DefringePurpleAmount>0</crs:DefringePurpleAmount>
             <crs:DefringePurpleHueLo>30</crs:DefringePurpleHueLo>
             <crs:DefringePurpleHueHi>70</crs:DefringePurpleHueHi>
             <crs:DefringeGreenAmount>0</crs:DefringeGreenAmount>
             <crs:DefringeGreenHueLo>40</crs:DefringeGreenHueLo>
             <crs:DefringeGreenHueHi>60</crs:DefringeGreenHueHi>
             <crs:ConvertToGrayscale>False</crs:ConvertToGrayscale>
             <crs:ToneCurveName2012>Linear</crs:ToneCurveName2012>
             <crs:ToneCurvePV2012>
                <rdf:Seq>
                   <rdf:li>0, 0</rdf:li>
                   <rdf:li>255, 255</rdf:li>
                </rdf:Seq>
             </crs:ToneCurvePV2012>
             <crs:ToneCurvePV2012Red>
                <rdf:Seq>
                   <rdf:li>0, 0</rdf:li>
                   <rdf:li>255, 255</rdf:li>
                </rdf:Seq>
             </crs:ToneCurvePV2012Red>
             <crs:ToneCurvePV2012Green>
                <rdf:Seq>
                   <rdf:li>0, 0</rdf:li>
                   <rdf:li>255, 255</rdf:li>
                </rdf:Seq>
             </crs:ToneCurvePV2012Green>
             <crs:ToneCurvePV2012Blue>
                <rdf:Seq>
                   <rdf:li>0, 0</rdf:li>
                   <rdf:li>255, 255</rdf:li>
                </rdf:Seq>
             </crs:ToneCurvePV2012Blue>
             <crs:CameraProfile>Adobe Standard</crs:CameraProfile>
             <crs:CameraProfileDigest>3CE8523BCEA625D0F0ABABADE3BCC281</crs:CameraProfileDigest>
             <crs:LensProfileSetup>LensDefaults</crs:LensProfileSetup>
             <crs:HasSettings>True</crs:HasSettings>
             <crs:HasCrop>False</crs:HasCrop>
             <crs:AlreadyApplied>True</crs:AlreadyApplied>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
             <tiff:XResolution>240/1</tiff:XResolution>
             <tiff:YResolution>240/1</tiff:YResolution>
             <tiff:ResolutionUnit>2</tiff:ResolutionUnit>
             <tiff:Make>Canon</tiff:Make>
             <tiff:Model>Canon EOS-1D Mark IV</tiff:Model>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:exif="http://ns.adobe.com/exif/1.0/">
             <exif:ExifVersion>0221</exif:ExifVersion>
             <exif:PixelXDimension>4896</exif:PixelXDimension>
             <exif:PixelYDimension>3264</exif:PixelYDimension>
             <exif:DateTimeOriginal>2012-12-16T17:11:53</exif:DateTimeOriginal>
             <exif:ExposureTime>1/30</exif:ExposureTime>
             <exif:FNumber>28/10</exif:FNumber>
             <exif:ExposureProgram>2</exif:ExposureProgram>
             <exif:ISOSpeedRatings>
                <rdf:Seq>
                   <rdf:li>3200</rdf:li>
                </rdf:Seq>
             </exif:ISOSpeedRatings>
             <exif:ShutterSpeedValue>4906891/1000000</exif:ShutterSpeedValue>
             <exif:ApertureValue>2970854/1000000</exif:ApertureValue>
             <exif:ExposureBiasValue>0/1</exif:ExposureBiasValue>
             <exif:MaxApertureValue>3/1</exif:MaxApertureValue>
             <exif:MeteringMode>5</exif:MeteringMode>
             <exif:Flash rdf:parseType="Resource">
                <exif:Fired>False</exif:Fired>
                <exif:Return>0</exif:Return>
                <exif:Mode>2</exif:Mode>
                <exif:Function>False</exif:Function>
                <exif:RedEyeMode>False</exif:RedEyeMode>
             </exif:Flash>
             <exif:FocalLength>64/1</exif:FocalLength>
             <exif:FocalPlaneXResolution>4896000/1290</exif:FocalPlaneXResolution>
             <exif:FocalPlaneYResolution>3264000/836</exif:FocalPlaneYResolution>
             <exif:FocalPlaneResolutionUnit>2</exif:FocalPlaneResolutionUnit>
             <exif:CustomRendered>0</exif:CustomRendered>
             <exif:ExposureMode>0</exif:ExposureMode>
             <exif:WhiteBalance>0</exif:WhiteBalance>
             <exif:SceneCaptureType>0</exif:SceneCaptureType>
             <exif:SubSecTime>00</exif:SubSecTime>
             <exif:SubSecTimeOriginal>00</exif:SubSecTimeOriginal>
             <exif:SubSecTimeDigitized>00</exif:SubSecTimeDigitized>
             <exif:SerialNumber>720600641</exif:SerialNumber>
             <exif:LensInfo>
                <rdf:Seq>
                   <rdf:li>24/1</rdf:li>
                </rdf:Seq>
             </exif:LensInfo>
             <exif:Lens>EF24-70mm f/2.8L USM</exif:Lens>
          </rdf:Description>
       </rdf:RDF>
    </x:xmpmeta>
    Message was edited by: JJMack

  • How to get XMP MetaData as an XML String in a process?

    Hi there,
    I have a process where I would like to export a documents XMP MetaData, manipulate the XMP MetaData and then import the MetaData again to the document.
    I thougt first I will use the service Name "XMPUtilityService" with the Service Operation "Export XMP" to export the XMP MetaData as a document.
    Hoewer I am not sure how to manipulate the output document from the Export XMP service.
    When I print out the document.toString() in a execute Script Service I get the following:
    <document state="active" senderVersion="0" persistent="false" senderPersistent="false" passivated="false" senderPassivated="false" deserialized="false" senderHostId="null" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="3440" contentType="null" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="A...</inline><senderPullServantJndiName/><attributes/></document>
    Actually I expected something like this:
    <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-jc006 DEBUG-1.0, 2009 Jun 23 11:07:21-PDT">
       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
          <rdf:Description rdf:about=""
                xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
             <pdf:Producer>Adobe LiveCycle PDF Generator ES2</pdf:Producer>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmp="http://ns.adobe.com/xap/1.0/">
             <xmp:ModifyDate>2010-04-20T20:43:59+02:00</xmp:ModifyDate>
             <xmp:MetadataDate>2010-04-20T20:43:59+02:00</xmp:MetadataDate>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
             <xmpMM:DocumentID>uuid:0cf2c6c6-2fba-2b39-5fb6-33ad8ccf58aa</xmpMM:DocumentID>
             <xmpMM:InstanceID>uuid:187bc5a2-acb0-2fa9-711d-33ad8ccf58aa</xmpMM:InstanceID>
          </rdf:Description>
       </rdf:RDF>
    </x:xmpmeta>
    <?xpacket end="w"?>
    What do I need to do to get the XMPMeta data as an XML String from a document within a process?
    Thanks in advance!
    Paul

    Hi,
    thanks for the answer.
    I know that I can retrieve the XMPUtilityMetadata object, but this object provides only access to a few information suche as creator, subject, producer, etc.
    However I would like to retrieve the whole XML String of the XMP Metadata.
    How is this possible?
    Thanks.
    Paul

  • [CS3 JS] How to force XMP metadata update for a thumbnail?

    Hi Folks,
    In a JavaScript in Bridge CS3, I'm updating a value in the XMP metadata for a Thumbnail. Later in the script I want to read the updated XMP metadata information from the Thumbnail, but often Bridge hasn't updated the metadata by the time I read it. In other words, my script reads the value prior to the update. I'm guessing there's a caching issue going on.
    I'm new to Bridge scripting, and I am hoping someone here can offer suggestions on how I can (or, even *if* I can) force Bridge to update the XMP metadata cache for a file so that when I read it later in the script it will reflect the recent changes. I've tried using Thumbnail.refresh(), but that doesn't seem to do the trick. I don't mind a slower script, I just want to be able to read the correct value.
    Thanks in advance for any help!
    -- Jim

    Hi David,
    I'm running this script on a MacBook Pro, 2.5GHz, 4GB RAM.
    Here is a sample JSX that shows the issue I'm having:
    #target "bridge-2.0"
    main();
    function main() {
        if( xmpLib == undefined ) {
            var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";
            var libfile = new File( pathToLib );
            var xmpLib = new ExternalObject("lib:" + pathToLib );
        var myValue = "Headline Test";
        var myFilePath = "~/Desktop/TestFile.tif";
        var curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
        XMPWriteHeadline(myFilePath, myValue);
        // *** I would like to refresh the cache here ***
        curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
    function XMPGetHeadline(theFilePath) {
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        return myHeadlineXMPProp;
    function XMPWriteHeadline(theFilePath, theTextStr){
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myOrigHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "Headline");
        xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Headline", theTextStr, 0, XMPConst.STRING);
        var updatedPacket = xmp.serialize
            (XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
        thumb.metadata = new Metadata(updatedPacket);
    To run this script, in main(), set the myFilePath variable to the path of a file that has an "IPTC Code" "Headline" property.
    This script, when run, sets the "Headline" property value to the value of myValue. After runing the script for the first time, take a look at the console log. You should see that Headline value displayed does not change between the two console entries. My log looks like this after the first run:
      Headline value: "undefined"
      Headline value: "undefined"
    The thing is, the second entry in the console listing, above, was created after the Headline value was set by XMPWriteHeadline(). The two values should be different between the two console entries.
    If you run the script a second time against the same file, you will see that the Headline value does contain the value that was written in the first run of the script--it just took some time to update the cache, I'm guessing. Here's the second run's log:
      Headline value: "Headline Test"
       Headline value: "Headline Test"
    So, what I'm looking for is a way to insert code (where the comment line "//*** I would like to refresh the cache here ***" appears), to force Bridge CS3 to refresh its cache so that when I call XMPGetHeadline() after calling XMPWriteHeadline(), the Headline value will return the value that was just written.
    I hope this is clear enough...
    Thanks!!!!
    -- Jim

  • Size limit for XMP metadata to be added externally to a file's metadata

    Hi,
    There is a situation where I need to add some 'text data' to the metadata of Adobe Illustrator document, in XMP format. The data being added is in the form of Array Item. While adding the data, I found that, after certain limit, the data addition is not happening. I read in the XMP Specification Part:3 that, the StandardXMP meta object(JPEG) can have size of 64 KB. It can be extended using ExtendedXMP object further..
    Is this limit applicable to text data also?
    Is there a limit on having such ExtendedXMP chunks?
    Will the data in ExtendedXMP be considered in same way as that of in StandardXMP?

    Hi,
    Your understanding is correct.
    I am able to add the metadata up to a certain point of time. After that as the CanPutXMP is failing, I am not able to put XMP packet inside the file.
    There is XMPMeta object - meta, which is derived from an AI file.
    SXMPMeta meta;
    myFile.GetXMP(&meta);
    //modifications appended to meta.
    string metaBuffer;
    meta.SerializeToBuffer(&metaBuffer);
    if(myFile.CanPutXMP(meta))
      // If so then update the file with the modified XMP
      myFile.PutXMP(meta);
    after certain point of time CanPutXMP is failing.
    Will you please tell me how to handle the CanPutXMP situation? What are probable causes for the same? I tried to google on it, but did not get satisfactory explanation.

  • Searching file metadata or file properties

    Does Oracle Text index file metadata? For example, when you select File, then Properties in MS Word, you can specify Author, Subject, Manager and other information. This is "metadata" inside the file.
    Since Oracle uses Stellent's InsideOut Content Access technology and www.stellent.com states that it does indeed pull metadata from all supported file types, does Oracle Text take advantage of this?
    Thanks in advance!

    Ahem, well this is interesting.  I haven't found a way to write a custom panel to display the JobName in CS and make it editable - perhaps a limitation to the panel language.<br /><br />One option is to create a template to apply to multiple files - either through the flyout menu in File Info, Replace in the Advanced panel or via the File Browser > Edit > Replace Metadata.<br /><br />Below is a template that I created.  Best way to create your own is to save a template with the JobName property present, then go in an edit the file to remove the other template data and retain the jobName section as I did below.<br /><br />Edit the jobName value between the tags and rename the template - then use the Replace command to apply it to files in CS.<br /><br />Not a pretty work around.  Otherwise I would suggest using another field going forward.<br /><br />Gunar<br /><br /><?xpacket begin='Ôªø' id='W5M0MpCehiHzreSzNTczkc9d'?><x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 3.0-29, framework 1.6'><br /><rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'><br /><br /> <rdf:Description rdf:about=''<br />  xmlns:stJob='http://ns.adobe.com/xap/1.0/sType/Job#'<br />  xmlns:xapBJ='http://ns.adobe.com/xap/1.0/bj/'><br />  <xapBJ:JobRef><br />   <rdf:Bag><br />    <rdf:li rdf:parseType='Resource'><br />     <stJob:name>new info goes into here</stJob:name><br />    </rdf:li><br />   </rdf:Bag><br />  </xapBJ:JobRef><br /> </rdf:Description><br /><br /></rdf:RDF><br /></x:xmpmeta><br /><?xpacket end='r'?>

  • Adding/Reading XMP Metadata in a psd file

    Hi,
    I'm having some troubles to understand how to add and read XMP metadata on a psd file. I followed the Panel developer guide tutorial, and try to look on the internet for some answers, but I'm still stuck ...
    Here is the simple example I'm trying to make (using part of the code from the panel developer guide) :
         The function loads the XMP Script Library.
         @returns True if the XMP Script Library was loaded successfully.
         @type Boolean
    function loadXMPLibrary(){
         if ( !ExternalObject.AdobeXMPScript ){
              try{
                   ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
              }catch (e){
                   alert("Can't load XMP Script Library");
                   return false;
         return true;
         The function unloads the XMP Script Library.
    function unloadXMPLibrary(){
         if( ExternalObject.AdobeXMPScript ) {
              try{
                   ExternalObject.AdobeXMPScript.unload();
                   ExternalObject.AdobeXMPScript = undefined;
              }catch (e){
                   alert("Can't unload XMP Script Library");
        Try to put a new property into the metadata
    if( app.activeDocument || !loadXMPLibrary()){
        var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);
        xmp.setProperty( XMPConst.NS_EXIF, "myProperty", "test" );
        activeDocument.xmpMetadata.rawData = xmp.serialize();
        unloadXMPLibrary();
        Window.alert(activeDocument.xmpMetadata.rawData);
    I don't really know where I'm wrong, could you help me please ?
    Thanks,
    Julien

    Rather mess with EXIF and Dublin Core namespaces, wouldn't it be better to create your own?
    IE:
    #target photoshop
    addtoMeta();
    function addtoMeta(){
    if(!documents.length) return;
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
    var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);
    var myNamespace = "http://my.fantastic.newspace/";
    var myPrefix = "nsfns:";
    XMPMeta.registerNamespace(myNamespace, myPrefix);
    xmp.setProperty(myNamespace, "myProperty", "A Test String");
    app.activeDocument.xmpMetadata.rawData = xmp.serialize();

  • Lighroom 3 writing metadata to image files?

    Hi,
    I have been wondering why my backups (differential) weregetting larger than they should, and I noticed that some of the files (.psd and .jpg, and mayde few .tiff) were modified. Interestingly, I do not see this happening to cr2-files, that I mostly use. After trying to figure out what's going on I noticed that corresponding xmp-files were modified also. This is not the issue due to their small size, but still I had not edited images that were changed for quite a while.
    Change that I see in xmp-files is rather large, and presumably related to Adobe's change in xmp-data structure. Eg.
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c007 1.136881, 2010/06/10-18:11:35   
    ">
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2-c020 1.124078, Tue Sep 11 2007 23:21:40   
    ">
    In addition to the sample above, whole xmp structure is changed. So I presume that maybe LR is writing metadata chages to xmp in the background?
    What I find disturbing is that when checking changed jpg files, I saw the similar data written into the jpg files also (files were created with oldish Canon 20D, and not edited for quite a while). These are examples from changed jpg-files (not the same from which the abone xmp-data change was taken, but similar change is visible in the corresponding XMP):
    Also jpg-file from offset 0x04 was changed from "50 60" to "51 18". Also offset 0x10 was changed (16 bits).
    I have Lightroom configuration option "Include develope settings in Metadata Inside JPEG, TIFF and PSD Files" not selected. The option "Automatically write changes to XMP" is selected. To my understanding neither of these should not have impact to the issue. Is there something else I should check?
    Change is made most likely by Lightroom 3.5 version, and has not occurred with previous versions. I have not notices this happening with 3.6, but I have been using it only few weeks. Is this known issue with previous version 3.5, or am I missing something obvious?
    System running is Windows 7 pro 64bit. I have not have any issues with LR lately, except crashes that I white about a week ago.
    Any advice on what's going on?

    So I was missing something. Thank you Hal.
    I had not realised that XMP goes inside of actual image files with those file types. Obviously my new backup routine spotted that, as I was on backuping only modified/new files.
    I would much prefer that also with above mentioned file types XMP-data would be stored in sidecar files instead of modifying the original file. To support this there are two arguments that I think are valid:
    1) modification of the file is always risky (and spesifically, with image originals I prefer to avoid that),
    2) modification leads to the fact that "smarter" backup strategies relying on "full backup" supported with differential or incremental backups lead to unnecessary long backuptimes and media consumption.
    That said, I prefer to have XMP-data also outside of the catalog so that other tools can also utilise it  (further, in addition to the catalog with sidecars I have sort of failover approach, and some of you may now say "belt and syspenders" after mentioning backups...).
    Is there a way to have all file types to utilise sidecars rather that modifying original file?

  • File info or metadata

    I cannot seem to find a way to enter the job name into the "file info" or metadata in Photoshop CS. If the job name was entered in a previous version of photoshop such as PS7 it will appear in the file info under the advanced tab underthe XMP Basic job ticket properties but cannot be edited. As a work around I am using PS 7 to enter my job name and then using CS for everything else. There must be a better way. Am I missing something?

    Ahem, well this is interesting.  I haven't found a way to write a custom panel to display the JobName in CS and make it editable - perhaps a limitation to the panel language.<br /><br />One option is to create a template to apply to multiple files - either through the flyout menu in File Info, Replace in the Advanced panel or via the File Browser > Edit > Replace Metadata.<br /><br />Below is a template that I created.  Best way to create your own is to save a template with the JobName property present, then go in an edit the file to remove the other template data and retain the jobName section as I did below.<br /><br />Edit the jobName value between the tags and rename the template - then use the Replace command to apply it to files in CS.<br /><br />Not a pretty work around.  Otherwise I would suggest using another field going forward.<br /><br />Gunar<br /><br /><?xpacket begin='Ôªø' id='W5M0MpCehiHzreSzNTczkc9d'?><x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 3.0-29, framework 1.6'><br /><rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'><br /><br /> <rdf:Description rdf:about=''<br />  xmlns:stJob='http://ns.adobe.com/xap/1.0/sType/Job#'<br />  xmlns:xapBJ='http://ns.adobe.com/xap/1.0/bj/'><br />  <xapBJ:JobRef><br />   <rdf:Bag><br />    <rdf:li rdf:parseType='Resource'><br />     <stJob:name>new info goes into here</stJob:name><br />    </rdf:li><br />   </rdf:Bag><br />  </xapBJ:JobRef><br /> </rdf:Description><br /><br /></rdf:RDF><br /></x:xmpmeta><br /><?xpacket end='r'?>

  • Read Image XMP Metadata

    Hi All,
    Hope I'm not spamming  this thread to your mailbox as I felt this question asked in unrelated  forum.
    Question: Can we read image meta data from Flex ?
    I tried it with xmp core library and passed a jpeg file to xmpMeta object :
    private function getImageMetadata(jpeg:File):void
                                  var meta:XMPMeta = new XMPMeta(jpeg);
                                  var packet:XML = meta.serializeToXML();
                                  var photoshop:Namespace = XMPConst.photoshop;
                                  var value:String = meta.photoshop::AuthorsPosition;
                                    trace(value); // returns null, not sure why
    Can any one help me to get the image metadata.
    Thanks in advance
    Mac

    I've got some content related to my issue from net but still it won't solve my problem
    private function init():void {
                                            var ldr:Loader = new Loader();
                                            ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
      var s:String = "my/jpgPath/myjpgName.jpg";
                                            ldr.load(new URLRequest(s));
                                  private function imgLoaded(e:Event):void{
                                            var info:LoaderInfo = e.target as LoaderInfo;
                                            var xmpXML:XML = getXMP(info.bytes);
      //trace(xmpXML);
                                            var meta:XMPMeta = new XMPMeta(xmpXML);
      //var packet:XML = meta.serializeToXML();
                                            var photoshop:Namespace = XMPConst.photoshop
                                            trace(meta.photoshop::AuthorsPosition);
                                  private function trim(s:String):String{
      return s.replace( /^([\s|\t|\n]+)?(.*)([\s|\t|\n]+)?$/gm, "$2" );
                                  private function getXMP(ba:ByteArray):XML{
                                            var LP:ByteArray = new ByteArray();
                                            var PACKET:ByteArray = new ByteArray();
                                            var l:int;
                                            ba.readBytes(LP, 2, 2);
                                            http://www.adobe.com/devnet/xmp.html
                                            read part 3: Storage in Files.
                                            that will explain the -2 -29 and other things you see here.
                                            l = LP.readInt() - 2 -29;
                                            ba.readBytes(PACKET, 33, l);
                                            var p:String = trim(encode(PACKET) as String);
      var i:int = p.search('<x:xmpmeta xmlns:x="adobe:ns:meta/"');
      /* Delete all in front of the XMP XML */
                                            p = p.substr(i);
                                            For some reason this left some rubbish in front, so I'll hardcode it out for now
                                            TODO clean up
                                            var ar:Array = p.split('<');
                                            var s:String = "";
                                            var q:int;
                                            var j:int = ar.length;
                                            for(q=1;q<j;q++){
                                                      s += '<'+ar[q];
                                            i = s.search('</x:xmpmeta>');
                                            i += ('</x:xmpmeta>').length;
                                            s = s.slice(0,i);
      /* Delete all behind the XMP XML */
                                            return XML(s);
                                  private static function encode(ba:ByteArray):String {
      var origPos:uint = ba.position;
      var result:Array = new Array();
       for (ba.position = 0; ba.position < ba.length - 1; )
       result.push(ba.readShort());
      if (ba.position != ba.length)
       result.push(ba.readByte() << 8);
      ba.position = origPos;
                                                      return String.fromCharCode.apply(null, result);
    It seems there is a bug in XMPMeta class where it always throws an exception "The XMPMeta object cannot have qualifiers", Even created with default (no param).
    Does anyone have any clue on this? please help
    Thanks
    Mac

  • Display subject distance in Lightroom metadata

    The EXIF data in the Lightroom database includes SubjectDistance but this does not appear in the Metadata windows.  It would be very handy if it was.
    (forgive me if I have overlooked it).
    (note: SubjectDistance is not recorded for all camera/lens combinations, eg 7D and Tamron does not)
    As a further and natural extension, you could then easily calculate and display Depth of Field estimates (Near/Far limits and total DOF)

    Digging deeper ...
    The Lightroom database has a table called AgHarvestedEXIFData, which has columns for aperture, focal length etc but not subject distance.
    There is also a table called agAdditionalMetadata.  This has a column XMP which is xml format EXIF data etc, including <SubjectDistance>
    So the data is in the database but not in the table which is used by the MetaData tab in the Default view option.
    So why does it sometimes show for you?
    The clue is the heading Shooting Info on your screenshot.  I don't get that.  However if I switch though to the EXIF option instead of Default the list of EXIF data fields changes, enough to make me think it is using different code.  I think in some circumstances it is clever enough to extract the data from the XMP field and push it into this form. I picked up a few 'Shooting Info' threads in the forums, bemoaning the loss of this data too.  Why sometimes and not others?  It might be your camera model/lens/focus mode, but possibly did you shoot tethered?
    Here is a sample of some of the XMP data - as you can see there is a lot of useful shooting information available but not accessible!
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2-c020 1.124078, Tue Sep 11 2007 23:21:40        ">
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
        xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
       <tiff:Make>Canon</tiff:Make>
       <tiff:Model>Canon EOS 7D</tiff:Model>
       <tiff:Orientation>1</tiff:Orientation>
       <tiff:ImageWidth>5184</tiff:ImageWidth>
       <tiff:ImageLength>3456</tiff:ImageLength>
      </rdf:Description>
      <rdf:Description rdf:about=""
        xmlns:exif="http://ns.adobe.com/exif/1.0/">
       <exif:ExifVersion>0221</exif:ExifVersion>
       <exif:ExposureTime>1/160</exif:ExposureTime>
       <exif:ShutterSpeedValue>7321928/1000000</exif:ShutterSpeedValue>
       <exif:FNumber>5/1</exif:FNumber>
       <exif:ApertureValue>4643856/1000000</exif:ApertureValue>
       <exif:ExposureProgram>3</exif:ExposureProgram>
       <exif:ISOSpeedRatings>
        <rdf:Seq>
         <rdf:li>100</rdf:li>
        </rdf:Seq>
       </exif:ISOSpeedRatings>
       <exif:DateTimeOriginal>2010-12-30T15:56:15.83+13:00</exif:DateTimeOriginal>
       <exif:DateTimeDigitized>2010-12-30T15:56:15.83+13:00</exif:DateTimeDigitized>
       <exif:ExposureBiasValue>0/1</exif:ExposureBiasValue>
       <exif:MaxApertureValue>4625/1000</exif:MaxApertureValue>
       <exif:SubjectDistance>317/100</exif:SubjectDistance>
       <exif:MeteringMode>5</exif:MeteringMode>
       <exif:Flash rdf:parseType="Resource">
        <exif:Fired>False</exif:Fired>
        <exif:Return>0</exif:Return>
        <exif:Mode>2</exif:Mode>
        <exif:Function>False</exif:Function>
        <exif:RedEyeMode>False</exif:RedEyeMode>
       </exif:Flash>
       <exif:FocalLength>70/1</exif:FocalLength>
       <exif:CustomRendered>0</exif:CustomRendered>
       <exif:ExposureMode>0</exif:ExposureMode>
       <exif:WhiteBalance>0</exif:WhiteBalance>
       <exif:SceneCaptureType>0</exif:SceneCaptureType>
       <exif:FocalPlaneXResolution>5184000/907</exif:FocalPlaneXResolution>
       <exif:FocalPlaneYResolution>3456000/595</exif:FocalPlaneYResolution>
       <exif:FocalPlaneResolutionUnit>2</exif:FocalPlaneResolutionUnit>
       <exif:PixelXDimension>5184</exif:PixelXDimension>
       <exif:PixelYDimension>3456</exif:PixelYDimension>
      </rdf:Description>
      <rdf:Description rdf:about=""
        xmlns:xap="http://ns.adobe.com/xap/1.0/">
       <xap:ModifyDate>2010-12-30T15:56:15.83+13:00</xap:ModifyDate>
       <xap:CreateDate>2010-12-30T15:56:15.83+13:00</xap:CreateDate>
       <xap:MetadataDate>2010-12-30T19:48:23.959-13:00</xap:MetadataDate>
       <xap:Rating>2</xap:Rating>
      </rdf:Description>
      <rdf:Description rdf:about=""
        xmlns:dc="http://purl.org/dc/elements/1.1/">
       <dc:creator>
        <rdf:Seq>
         <rdf:li>Paul Willyams</rdf:li>
        </rdf:Seq>
       </dc:creator>
       <dc:rights>
        <rdf:Alt>
         <rdf:li xml:lang="x-default">Copyright Paul Willyams</rdf:li>
        </rdf:Alt>
       </dc:rights>
      </rdf:Description>
      <rdf:Description rdf:about=""
        xmlns:aux="http://ns.adobe.com/exif/1.0/aux/">
       <aux:SerialNumber>670502410</aux:SerialNumber>
       <aux:LensInfo>28/1 135/1 0/0 0/0</aux:LensInfo>
       <aux:Lens>EF28-135mm f/3.5-5.6 IS USM</aux:Lens>
       <aux:LensID>178</aux:LensID>
       <aux:ImageNumber>0</aux:ImageNumber>
      <aux:ApproximateFocusDistance>317/100</aux:ApproximateFocusDistance>
       <aux:FlashCompensation>0/1</aux:FlashCompensation>
       <aux:Firmware>1.1.0</aux:Firmware>
      </rdf:Description>
    etc

  • Rotate in Metadata

    We just got a Sony A900 digital camera that places 'Standard' or 'Rotate [+90 degrees]' in the metadata of the images.  Photoshop rotates the images that have Rotate in the metadata. I did not know that Photoshop did this, but since it does why can you not turn this off in Photoshop?  Sony does not document this feature in the camera's manual so I am having the hardest time communicating with Sony on how to turn it off in the camera.  We also receive images from outside sources so being able stop Photoshop from rotating images would be real helpful.

    I was wrong there is a way of getting the orientation value and undoing the auto rotate.
    You could set up File - Scripts - Scripts Events Manager to call the following script on "open document" event.
    It gets the orientation value from the Bridge Thumbnail where the metadata hasn't been changed and rotates the document the opposite amount.
    #target photoshop
    var myScript = "function main(){"+
    "try{ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');}catch(e){}"+
    "var thumb = new Thumbnail('"+activeDocument.fullName.fsName +"');"+
    "var md = thumb.synchronousMetadata; var source = new XMPMeta( md.serialize());"+
    "var orientation = source.getProperty( XMPConst.NS_TIFF, 'Orientation');"+
    "var orientationVal = parseInt( orientation );"+
    "return orientationVal;}main();"
    if (!BridgeTalk.isRunning("bridge")) BridgeTalk.launch("bridge");
    while(!BridgeTalk.isRunning("bridge")){$.sleep( 100 );}
    $.sleep( 100 );
    var num;
    var bt = new BridgeTalk;
        bt.target = "bridge";
        bt.body = myScript;
    bt.onResult = function( inBT ) {num = (parseInt(inBT.body) );rotateFile(num);}
        bt.send();
    bt.pump();
      $.sleep( 100 );
      var timeOutAt = ( new Date() ).getTime() + 5000;
      var currentTime = ( new Date() ).getTime();
      while ( ( currentTime < timeOutAt ) && ( undefined == num ) ) {
       bt.pump();
       $.sleep( 100 );
       currentTime = ( new Date() ).getTime();
    function rotateFile(value){
    var doc=activeDocument;
    switch(value){
    case 3 : doc.rotateCanvas(-180); break;
    case 6 : doc.rotateCanvas(-90); break;
    case 8 : doc.rotateCanvas(90); break;
    default : break;

  • Writing XMP Thumbnail Metadata to AE Preset

    Hi guys.
    I am working on a After Effects script to basically insert a gif as metadata into a fx preset file. If you open Adobe bridge and browse to the After effects text presets you will see that you can click on a preset and in the preview there is an animated GIF. So I am attempting to do this for custom presets.
    Basically I think I need to read the contents of a GIF file as data, or text, then encode that as base64 and insert it into the metadata of the preset file.
    I have a come across a couple of problems though:
    1) I can't seem to read in the GIF file as data
         The code I am using is:
    file = new File("C:\\test.gif");
    file.open("r");
    test = file.read();
    alert(test);
    And all I get returned is the first part of the data which is "GIF89aØ", It seems that when white space is encountered After Effects stops reading the data.
    2) I have been testing some code to write thumbnail data to a preset file, but I have come across an issue here too.
    if (ExternalObject.AdobeXMPScript == undefined) {
    ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
    xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
    file = new File("C:\\joshPreset.ffx");
    xmpFile = new XMPFile(file.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
    var xmp = xmpFile.getXMP();
    xmp.appendArrayItem( "http://ns.adobe.com/xap/1.0/","Thumbnails",null, 0,XMPConst.ARRAY_IS_ALTERNATIVE );
    This code works, it inserts a Thumbnails array into the metadata, which looks like this:
       <xmp:Thumbnails>
        <rdf:Alt>
        </rdf:Alt>
       </xmp:Thumbnails>
    I then need to add other properties within the Thumbnails array like xapGImg:height and xapGImg:image
    So from what I read in the documentation I need to add a Struct field?
    I add these lines to my code:
    XMPMeta.registerNamespace("http://ns.adobe.com/xap/1.0/g/img/", "xapGImg");
    xmp.setStructField("xapGImg","Thumbnails","xapGImg:height", 0,null );
    The first line is to register the name space. xapGImg is what I found in the after effects text preset file.
    The second line is to add a struct field to the array. But I get an error whenever I run it with the second line. It says:
    XMP Exception: Unregistered schema namespace URI
    I have tried all different combinations of the namespace in the second line but just cannot get it to work!
    If anyone can help that would be great!

    Hi AthorNZ,
    I can only give you some answers regarding question 2.
    First of all you should be aware that XMPFiles does not offer smart handling of AE project files. Instead it uses so called "packet scanning" to work with the XMP within the file. This means that reading of XMP data works fairly well but updating it is rather limited. If no XMP is present in the file, it cannot be newly injected. If XMP is present, it can only be updated within the given space (i.e. padding) that already exists within the file. Otherwise an update is rejected.
    Regarding the thumbnails: Your first snippet of code is correct. But for one you do not need to register the thumbnail related namespace as it is a pre-registered one. So you can use the constants from XMP_Const.h to work with those namespaces.
    Secondly to set a struct field within the array you need to use the namespace URIs and not prefixes. Again you can use constants already defined:
    xmp.setStructField( kXMP_NS_XMP, "Thumbnails", kXMP_NS_XMP_Image, "height", <your value> );
    You got the exception because XMPCore tried to interpret your prefixes as URIs which were not registered, of course.
    Kind regards
    Jörg
    Adobe XMP

  • Writing XMP Thumbnail Metadata to AE Preset (Scripting)

    Hi guys.
    I am working on a script to basically insert a gif as metadata into a fx preset file. If you open Adobe bridge and browse to the After effects text presets you will see that you can click on a preset and in the preview there is an animated GIF. So I am attempting to do this for custom presets.
    Basically I think I need to read the contents of a GIF file as data, or text, then encode that as base64 and insert it into the metadata of the preset file.
    I have a come across a couple of problems though:
    1) I can't seem to read in the GIF file as data
         The code I am using is:
    file = new File("C:\\test.gif");
    file.open("r");
    test = file.read();
    alert(test);
    And all I get returned is the first part of the data which is "GIF89aØ", It seems that when white space is encountered After Effects stops reading the data.
    2) I have been testing some code to write thumbnail data to a preset file, but I have come across an issue here too.
    if (ExternalObject.AdobeXMPScript == undefined) {
    ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
    xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
    file = new File("C:\\joshPreset.ffx");
    xmpFile = new XMPFile(file.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
    var xmp = xmpFile.getXMP();
    xmp.appendArrayItem( "http://ns.adobe.com/xap/1.0/","Thumbnails",null, 0,XMPConst.ARRAY_IS_ALTERNATIVE );
    This code works, it inserts a Thumbnails array into the metadata, which looks like this:
       <xmp:Thumbnails>
        <rdf:Alt>
        </rdf:Alt>
       </xmp:Thumbnails>
    I then need to add other properties within the Thumbnails array like xapGImg:height and xapGImg:image
    So from what I read in the documentation I need to add a Struct field?
    I add these lines to my code:
    XMPMeta.registerNamespace("http://ns.adobe.com/xap/1.0/g/img/", "xapGImg");
    xmp.setStructField("xapGImg","Thumbnails","xapGImg:height", 0,null );
    The first line is to register the name space. xapGImg is what I found in the after effects text preset file.
    The second line is to add a struct field to the array. But I get an error whenever I run it with the second line. It says:
    XMP Exception: Unregistered schema namespace URI
    I have tried all different combinations of the namespace in the second line but just cannot get it to work!
    If anyone can help that would be great!

    This question is cross-posted on the XMP SDK forum:
    http://forums.adobe.com/thread/572055

  • Metadata not saved in xmp, but in bridge cache

    I have a script that sets the metadata for the following fields:
    GPSLatitude
    GPSLongitude
    GPSAltitudeRef
    GPSAltitude
    and the data shows as having been applied in the Bridge Application, but the data is not in the sidecar XMP file, nor DNG files. If I move the file out of bridge the metadata goes away.
    Is there something I'm doing wrong when setting these values?

    Hi Omar,
    I also was trying to insert GPS data in the XMP files, and came on to the same problem you encountered. I also don't understand why specific EXIF fields cannot be updated. I know they shouldn't be updated (in an user interface), but sometimes there are some exception, like we can find in this thread here.
    However, I finally did find a solution, but it need some more testing to say it really works under all circumstances. Perhaps it can also be of any help on ohter EXIF fields.
    Here is my solution:
    1) Create a new XMPMeta object and fill in your GPS fields
    2) Get the current XMP metadata from the selected thumbnail
    3) Use XMPUtils.appendProperties to combine the two meta data objects
    4) Write the appended metadata to the XMP file
    5) Write the appended metadata back to the current thumbnail
    I've used the following script snippit:
    var xmp = new XMPMeta();
    xmp.setProperty(XMPConst.NS_EXIF,'GPSLongitude',longitude);
    xmp.setProperty(XMPConst.NS_EXIF,'GPSLatitude',latitude);
    xmp.setProperty(XMPConst.NS_EXIF,'GPSAltitude',altitude);
    xmp.setProperty(XMPConst.NS_EXIF,'GPSMapDatum','WGS-84');
    var md = thumb.synchronousMetadata;
    var xmp2 = new XMPMeta(md.serialize());
    XMPUtils.appendProperties(xmp,xmp2,XMPConst.APPEND_ALL_PROPERTIES | XMPConst.APPEND_REPLACE_OLD_VALUES | XMPConst.APPEND_DELETE_EMPTY_VALUES);
    var xmpFile2 = new XMPFile(thumb.spec.fsName,XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
    if (xmpFile2.canPutXMP(xmp2))
    xmpFile2.putXMP(xmp2);
    xmpFile2.closeFile();
    var xml = xmp2.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
    thumb.metadata = new Metadata(xml);
    I have not tested this with JPG and TIFF files. I have tested a bit with existing and non existing XMP files.
    Any suggestions are very welcome!
    Erwin

Maybe you are looking for

  • OAM- "You do not have sufficient access rights" message with Master Admin

    Customer has configured the OAM system to have both the primary and the secondary side for failover purposes. The back end directory server on both systems are in sync. The primary side of the systems works well as far as this issue is concerned. On

  • Run time Error while executing project infosystem reports (CN41/41N)

    Hi, I would like to inform while running project infosystems reports (CN41/41N / cns41 etc), it is taking long time & most of the time run time errors are coming. I observed due to more objects in projects, run time error is coming. Request you to su

  • How to delete client from oracle 10g ASM

    Hi, I would like to know how to delete client from oracle 10g ASM, while configuring Dataguard in same windows os i have by mistake created the standby in ASM. However later i have corrected the datafile destination. My Primary database is in ASM and

  • Convert RGB ID Document to CMYK

    When I create a document I convert the images to CMYK in PS before I place them. However, I have a multi-page CS ID document for printing provided by a customer that is in good order except that the photos are RGB. I need to create a high res CMYK PD

  • Acrobat Distiller unable to convert the files to PDF.

    Sometimes when I provide multiple files to Adobe Acrobat Distiller to convert them to PDF it opens multiple instances of it which can be seen in the Task Manager but the conversion to PDF stops. The version of Acrobat is 6.0. Could you please suggest