Can I automate the writing of XMP metadata into JPEG and TIFF files?

I have written an ASP.NET 3.5 website application on behalf of an annual international photographic competition. Entrants will be uploading digital photos in either JPEG or TIFF format. Ideally, I would write entrant identity and image title information into the XMP metadata for each image immediately after upload - but so far, I have failed to find any way to do this in ASP.NET.
Thousands of images are involved, so I need to find a way to automate the metadata insertion, perhaps with some sort of script that uses a text file (extracted from the SQL Server database on my website) as the source of the metadata for a batch of images. Is this the sort of task that can be done by writing a script for Bridge CS3? Are there any scripts already in existence that I could use? I am a total beginner in this area.
I use a Win XP PC, though I have a colleague who, I think, has CS3 on his Mac (running under the Leopard OS), so scripts for either platform might be usable.
David

You are the man X!
Ok here is another version with a check for the dll.
#target bridge 
   if( BridgeTalk.appName == "bridge" ) {
addInfo = new MenuElement("command", "Update Entry Details", "at the end of Thumbnail");
addInfo .onSelect = function () {
     main();
function main(){
var csv = File.openDialog("Please select CSV file.","CSV File:*.csv");
if(csv != null){
loadXMPScript();
csv.open("r");
while(!csv.eof){ 
   strInputLine = csv.readln();
   if (strInputLine.length > 3) {
      strInputLine = strInputLine.replace(/\\/g,'/');
   inputArray  = strInputLine.split(",");
   var csvFile = new File(inputArray[0]);
   var title = inputArray[1];
   var author = inputArray[2];
if(!csvFile.exists) {
alert(csvFile + " Does not exist"); //////////Check if file exists
return;
if(csvFile.exists){
var file = new Thumbnail(csvFile);
try{
var xmpFile = new XMPFile(file.path, XMPConst.UNKNOWN,XMPConst.OPEN_FOR_UPDATE);
}catch(e){
      alert("Problem opening xmp for update:-\r" + file.path +"\r" +e.message);
      return;
try{
var xmp = xmpFile.getXMP();
}catch(e){
      alert("Problem opening xmp data:-\r"  + e.message);
      return;
xmp.deleteProperty(XMPConst.NS_DC, "creator");
xmp.deleteProperty(XMPConst.NS_DC, "title");
try{
xmp.appendArrayItem(XMPConst.NS_DC, "creator", author, 0,XMPConst.ARRAY_IS_ORDERED);
xmp.appendArrayItem(XMPConst.NS_DC, "title", title, 0,XMPConst.ARRAY_IS_ORDERED);
}catch(e){
      alert("Problem writing xmp data:-\r"  + e.message);
      return;
if (xmpFile.canPutXMP(xmp)) {
xmpFile.putXMP(xmp);
}else{
alert("Can not write new metadata to " + csvFile.spec); 
xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
unloadXMPScript();
function loadXMPScript()
   var results = new XMPLibMsg("XMPScript Library already loaded", 0, false);
   if (!ExternalObject.AdobeXMPScript)
      try
         ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');    
         results.message = "XMPScript Library loaded";
      catch (e)
         alert("Could not load AdobeXMPScript \r" + e.message);
         results.message = "ERROR Loading AdobeXMPScript: " + e;
         results.line = e.line;
         results.error = true;
   return results;
function unloadXMPScript()
   var results = new XMPLibMsg("XMPScript Library not loaded", 0, false);
   if( ExternalObject.AdobeXMPScript )
      try
         ExternalObject.AdobeXMPScript.unload();
         ExternalObject.AdobeXMPScript = undefined;
         results.message = "XMPScript Library successfully unloaded";
      catch (e)
         results.message = "ERROR unloading AdobeXMPScript: " + e;
         results.line = e.line;
         results.error = true;
   return results;
function XMPLibMsg (inMessage, inLine, inError)
   this.message = inMessage;
   this.line = inLine;
   this.error = inError;

Similar Messages

  • Can "jpeg+raw" imported single file be split into jpeg and raw files?

    I manage to choose to import my jpeg and raw pictures as single jpeg+raw files accidentely. What means with this format? can I split this "jpeg+raw" pictures into jpeg and raw again? If you edit a jpeg+raw picture are you just working with the raw file, I mean I saw that I could change the exposure on the file which you only can do on raw files. Is it a bad idea to import jpeg and raw pictures as a single file? I really don´t understand the properties of this "jpeg+raw"-file
    /Magnus Lightroom rookie

    With RAW+JPEG, the JPEG is only used for the initial Library view, prior to generating previews from the RAW file. Once you have generated previews and/or developed the image, the JPEG is unused. The edits you make won't affect the JPEG at all. It is, however, still tied to the RAW as metadata, so deleting the JPEG will flag your image as having problems (and list it as "missing" even though it's very clearly in your catalog). Tuning off the option to handle RAW+JPEG together in preferences won't fix past combo images, but it will avoid making this idiotic mistake in the future. After turning it off, export your metadata to the RAWs, then delete them from the library (not the disk) and then reimport them without the JPEGs. Peace will rule the world.

  • How to insert xmp metadata into jpeg files?

    Hi
    Is it possible to automatically insert the metadata
    with the script using text extracted from my database.
    I have to insert the metadata into lots of images which are uploaded to a site.
    Thanks
    [signature deleted bu host]

    A scripting tool you may use, although complex, is ImageMagick.  It allows loads of image manipulate but also handles data.
    Another options is DBGallery, which will very easily allow XMP data to be written to hundreds or thousands of files at a time, but not via script (it's a Windows application).  You can see a quick screenshot tour of it's IPTC/XMP capabilities here.
    Hope this helps,
    Glenn
    Developer of DBGallery: The Photo DATAbase

  • Incrementally appending  custom XMP metadata into PDF files

    I have a problem writing custom XMP metadata into a PDF document (I'm using the XMP Toolkit SDK).
    The problem is that I don't know whether is possible to expand the XMP packet in order to append metadata incrementally into the document, and, if it is possible, I don't know how to do it. The program I wrote succesfully appends an item to an array four times, but it fails when trying to append the fifth one. The reason obviously is that the packet gets full and there is not room for more metadata. The error message, if I force the PutXMP call, is:
    ERROR: Can't fit into specified packet size
    So, what can I do? How to enlarge the packet or make it expandable? Or, otherwise, have I to inject a new XMP packet with the up-to-date information in it? How?
    And a last question: Have I to scan for packets when dealing with PDF files? No smart handlers are available for this kind of files?
    Thanks in advance.
    Xabier Artola.
    Univ. of the Basque Country.

    Were you able to find a solution to this problem? I am having the same issue.
    Jason

  • Can I automate the creation of a cluster in LabView using the data structure created in an autogenerated .CSV, C header, or XML file?

    Can I automate the creation of a cluster in LabView using the data structure created in an auto generated .CSV, C header, or XML file?  I'm trying to take the data structure defined in one or more of those files listed and have LabView automatically create a cluster with identical structure and data types.  (Ideally, I would like to do this with a C header file only.)  Basically, I'm trying to avoid having to create the cluster by hand, as the number of cluster elements could be very large. I've looked into EasyXML and contacted the rep for the add-on.  Unfortunately, this capability has not been created yet.  Has anyone done something like this before? Thanks in advance for the help.  
    Message Edited by PhilipJoeP on 04-29-2009 04:54 PM
    Solved!
    Go to Solution.

    smercurio_fc wrote:
    Is this something you're trying to do at runtime? Clusters are fixed data structures so you can't change them programmatically. Or, are you just trying to create some typedef cluster controls so that you can use them for coding? What would your clusters basically look like? Perhaps another way of holding the information like an array of variants?
    You can try LabVIEW scripting, though be aware that this is not supported by NI. 
     Wow!  Thanks for the quick response!  We would use this cluster as a fixed data structure.  No need to change the structure during runtime.  The cluster would be a cluster of clusters with multiple levels.  There would be not pattern as to how deep these levels would go, or how many elements would be in each.   Here is the application.  I would like to be able to autocode a Simulink model file into a DLL.  The model DLL would accept a Simulink bus object of a certain data structure (bus of buses), pick out which elements of the bus is needed for the model calculation, and then pass the bus object.  I then will take the DLL file and use the DLL VI block to pass a cluster into the DLL block (with identical structure as the bus in Simulink).  To save time, I would like to auto generate the C header file using Simulink to define the bus structure and then have LabView read that header file and create the cluster automatically.   Right now I can do everything but the auto creation of the cluster.  I can manually build the cluster to match the Simulink model bus structure and it runs fine.  But this is only for an example model with a small structure.  Need to make the cluster creation automated so it can handle large structures with minimal brute force. Thanks!  

  • How can i save the acr changes i make to jpegs (not as sidecar xmps)?

    Hi Guys!
      I have been a full-time pro photog for 16 years and yes, yes, I always shoot in raw.  Except on my cameraphone.    I am on a pc.  We have hundreds of pics that my family took on cameraphones on a recent cruise (when we didn't feel like lugging the pro gear around all day).  Some need some adjustments before printing.  My 16 year old is comfortable with the basics in ACR and went in there herself and started making her adjustments.  For MY wedding pics (CR2s), I have the xmps saved as sidecars and would like to keep it that way.  I am suspecting that her adjustments aren't being saved becuase of this?  If this is the case, I would be happy to change that setting (after 45 min I still can't figure out how!! i must have come across it but just am not seeing it!) temporarily for her for a day or two and then permenantly switch it back for my own editing purposes.  If that is not the case, please, please, please give any pointers!!
      The adjustments show up in bridge after she makes them in ACR, but don't show up (dark pic still dark) when I open the pic anywhere outside of Bridge (such as when we email it to another computer to check it or in windows).  If we try to open in plain old CS5, ACR opens the file no matter what, which makes sense since the new info apparently isn't embedded into the file.
      Yes, I can teach her how to do her adjustments in CS5 (rather than cs% Bridge and ACR) but she has a huge scrapbooking day planned with Grandma on Wednesday and living in FL, we are in the thick of our wedding season right now, so I don't have time to teach her.  If there is ANY way to get the ACR adjustments saved to the files?  Thank you soooooo much for any help!
    Cher

    Settings you make in ACR for a Raw file are written to the separate XMP side car file. (The Camera Raw preferences has this set by default and to my opinion it should stay so, but the other option is to save them in a central database)
    However, opening the same file in ACR and make new adjustments the previous settings are overwritten by the new ones. You can save them separately but that would be a hell of a job. If you want to be on the safe side you should make a proper back up of the whole folder (be sure to have the XMP files included, by default those are hidden files in Bridge) before someone else starts playing with the settings. However, you can always go back to the default version using the option in the little menu icon next to the name op f the panel (first panel is Basic). click on the icon and from the provided menu choose 'Reset Camera Raw Defaults' to go back to the originals.
    I don't use jpeg in ACR very often but I believe ACR settings for jpeg and tiff are written in the XMP data in the file itself instead of a separate XMP file. You can revert to default or make new settings that also overwrite the older settings.
    Making adjustments in ACR shows the results in Bridge (it uses the XMP data for the preview) but to make it visible in other apps you also have to save them in Photoshop itself to make the changes persistent so that mail and print reflect your settings.
    So basically, let her play with the files and either chose the option to save the files (bottom left in ACR Window and choose the wanted provided options or open and save them in Photoshop to get the proper result. And if you want to be on the safe side let here use her own copies and keep the originals to your self.

  • Can I automate the process of printing booklet?

    Can I automate the process of printing booklet?
    I use a saved Print Preset named "A5 booklet"
    I supply page range 1-16 then print as pdf using PDFCreater.
    File Name as 01.pdf, then pages 17-32 as 02.pdf and so on.
    I am aware that InDesign provides printBooklet() method through scripting, but I have no clues how to use it.
    Any links or scripts are welcome.
    Thanks and regards.

    Thanks stephen0218 for the idimposer link.
    I'm aware of Print Booklet... functionality, and I am currently using it to manually print booklets from InDesign files.
    I want to automate the print booklet task itself.
    I make 01.pdf with page range of 1-16, then 02.pdf with page range 17-32 and so on.
    It is not that much tedious for small files of upto 160 pages, which generate 10 pdf files. But for larger projects of upto 600 pages, the manual work is very time consuming and error prone process.
    I tried to call "document.printBooklet" function in JavaScript, but got stuck in supplying dynamic page ranges.
    Here is the Documentation.
    It will be a great help if anyone can help me here.
    Thanks and regards.

  • Who can I automate the process of printing booklet?

    Who can I automate the process of printing booklet.
    I use a saved Print Preset named "A3 booklet"
    I supply page range 1-16 then print as pdf using PDFCreater.
    File Name as 01.pdf, then pages 17-32 as 02.pdf and so on.
    I am aware that InDesign provides printBooklet() method through scripting, but I have no clues how to use it.

    Thanks stephen0218 for the idimposer link.
    I'm aware of Print Booklet... functionality, and I am currently using it to manually print booklets from InDesign files.
    I want to automate the print booklet task itself.
    I make 01.pdf with page range of 1-16, then 02.pdf with page range 17-32 and so on.
    It is not that much tedious for small files of upto 160 pages, which generate 10 pdf files. But for larger projects of upto 600 pages, the manual work is very time consuming and error prone process.
    I tried to call "document.printBooklet" function in JavaScript, but got stuck in supplying dynamic page ranges.
    Here is the Documentation.
    It will be a great help if anyone can help me here.
    Thanks and regards.

  • Can I automate the parameters of auxiliary tracks???

    Hi all,
    1 - I would like to know if the parameters of an auxiliary or a bus track can be automated, eg: if I load a kick and a snare into ESX24 then route each one to individual auxiliary tracks; then insert say for example a delay effect to the kick and a filter to the snare, can I then automate the parameters of such effects somehow?
    2 - On the same topic, if I send a track to a bus which again has an insert such as a filter , can I automate the parameters of this filter?
    Is just that i can not view these tracks in the automation screen, maybe there is a way to do it? please???

    Sure, in the mixer right click on the Aux tracks you want to automate->menue openes->create Arrange tracks.
    Then set the Aux tracks in the Arrange to Latch and move the knobs in your Plug Ins or just draw in the automation nodes in the Arrange page on the respecting parameter.

  • Can we automate  the seccurity .

    Can we automate the seccurity .
    Suposse if i want to create a user on EAS Console and assign the filters or gruops - can this be done by any automation process.
    Edited by: user631939 on Mar 25, 2009 7:18 PM

    Hi,
    Yes, you can excute Maxl with command-line arguments by using flag/option essmsh -a which allows a string of command-line arguments to be referenced from within the subsequent INTERACTIVE session. These arguments can be referenced with positional parameters, such as $1, $2, $3, etc. For Ex. -
    /*Invoke MaxL shell with command-line arguments */
    essmsh -a USER1 PASSWORD1 GROUP1 FILTER1
    /*MaxL command to create user USER1 and assign it to group GROUP1*/
    MAXL > create user $1 identified by $2 member of group $3;
    /*MaxL command to assign filter FILTER1 to user USER1*/
    MAXL > grant filter $4 to $1;
    hope it answers your question.
    Atul K,

  • I can't see the writing properly since all the changes.    Can i make it darker as its just light grey

    I can't see the writing properly on my iMac iPad mini or iPhone.  I feel like throwing them all out.. or selling them as no point in using them if I can't see the writing is just a light grey.  please can i change this to a darker script

    Hi there Chrisey01,
    You may find the Increase Contrast, Bold and Large Text, and Reduce Transparency options in iOS helpful for making the text more legible. Take a look at the User Guide page below for more options. Note: Reduce Transparency is found with the Increase Contrast setting.
    Large, bold, and high-contrast text
    -Griff W. 

  • How can we automate the Depreciation keys based on production for business

    How can we automate the Depreciation keys based on production for business u2013 this is currently not an optimised process if we expect business to manually change the keyu2019s on a monthly basis.
    The end user updates the table, transaction AO25, manually on month end after the production calculations are completed. The question is, is it possible when the PP is completed, that the system updates the Period Unit table for that period?
    Thanks.
    Regards,
    PS PS

    Hi,
    I am new at this, so I need a explanation on how will this help me, and how do I get about doing this?
    Thanks a lot.
    Regards,
    PS PS

  • How can I automate the multi-step process of looking up a caller's contact details when a telephone call comes in with caller ID?

    How can I automate the multi-step process of looking up a caller's contact details when a telephone call comes in with caller ID. I want to be able to see more than just the first & last name when a client calls me. I would like the caller ID to pull up the same information that shows up when you search for and find a contact name and then click on the right arrow.
    My workaround is to force/enter both the last name and the address in the last name field since then the address will show up.
    The only computerized way to look up this additional information is to put the client on hold, memorize the first and last name and correctly enter it in the search field of the contact database and hopefully find it before the client gets tired of waiting.
    Note that I go to about 48 small jobs per week. So far I have about 9,000 contacts. It's easy to make a mistake and have the client wondering what I'm doing and what's taking so long.
    The second workaround is to use paper and pencil and ask the client for name, address, cross street and phone number again, repeating what I did some time previously.
    Please help meautomate this process.

    You don't have to put anyone on hold. When the call comes in, tap the Home button, then tap contacts, go to the contact. Tap Home button when finished, tap the top banner to return to the call screen.

  • HT201320 I have two email accounts. However, the iPad automatically uses the account that I only want to use for business. How can I change the account from which mail is sent and received?

    I have two email accounts. However, the iPad automatically uses the account that I only want to use for business. How can I change the account from which mail is sent and received?

    You are most welcome

  • How can you automate the monthly opening of MM periods

    How can you automate the monthly opening of MM periods ????????????

    RMMMPERI accepts a period/year or a date.
    If you enter a date the period is derived by it.
    1. create a variant and check the attribute 'selection variable' for the parameter date. Then click the button 'Selection variables' and set the current date. Every time this variant is used the parameter DATE is filled with the current date.
    2. create a job for RMMMPERI with the variant created in the preceding step. Set it as periodic.
    If you're not using a fiscal year variant simply schedule it as monthly (to be executed the first day of the month).
    If you are using a fiscal year variant you'd have to define a calendar with only the first day of each period defined as working 
    day and use it in the periodicity restrictions.
    Another possibility:
    Write a very simple ABAP which run daily to check if the period has changed and submit RMMMPERI.
    Regards
    Chander

Maybe you are looking for

  • Why can't I hook up to my own WiFi network?

    I am unable to hook up to my own home WiFI from Brighthouse. I have my phone set on auto to ask to join networks and always in the past it has gone immediately to my network, but now says" unable to join network." Is this an iPhone problem, Brighthou

  • Custom class to load a webservice in flex

    class allows user to load any wsdl file and user can listen all necessary events in any mxml file by heaving an object of this class.

  • PB00 and inforecord

    Dear All in create P.O if there are info record for (material+vendor) i want condition type PB00 in item detail comes otherwise condition type PBXX comes.please guide me how can customizing? best regards R.T

  • My 1st Podcast,,,didn't work....voice did not go over jingle track!

    I used a MBP, muted all the channels, enabled the vocal, used the onboard mic on the laptop - - when I play it back, the music does NOT DECREASE in volume at all. Have worked audio for a while, so I am sure and of course, muted all the tracks so it w

  • Where can I buy OS X 10.5?

    I have PowerBook G4 (1.67ghz) and OS X 10.4.11. I need to upgrade OS to OS X 10.5.8 to work with new iPhone 4. I wonder if I can still buy 10.5.8 or 10.5 in some stores or somewhere, and if the price range is around $29. Thanks in advance for help!