Jump to content

Addons: Photoshop Script Exporter


rsmith1
 Share

Recommended Posts

Since I use Adobe Camera Raw as my raw file converter and I store the raw files in my DAM, I need to use Photoshop to batch process files rather than the image processor in the DAM itself. Several years ago I created a script do this from IDImager, and I have just completed a custom exporter for Daminion that does the same thing. The basic idea is to use Daminion to select the group of files to work with then send them to a Photoshop batch processing script as if they had been selected in Bridge. My main use for this is the Image Processor (or the enhanced version, Dr. Brown's 1-2-3 Process) to prepare files for printing, websites, etc.

 

post-1185-0-99026800-1357912759_thumb.png

 

I have attached the necessary DLL's in a zip file to this post in case anyone else would like to try it. If you are interested, there are a couple of caveats:

1.) I did not localize the exporter; the UI is hard-coded in English.

2.) Photoshop CS(x) is required; Photoshop Elements will not work.

3.) Since Daminion is a 32-bit application, this exporter only works with 32-bit Photoshop (which is always installed along with the 64-bit version).

4.) I have only tested with Photoshop CS5 on a 64-bit system; I don't have any other environments handy to test in.

 

If you are interested in running it, here are the necessary steps to install and use it:

1.) Unzip the files into the Addons directory of Daminion (e.g. C:\Program Files (x86)\Daminion Software\Daminion\Addons):

 

(Edit: updated link with newest version)

PSScriptExporter.zip

 

2.) Ensure that Photoshop has registered its COM libraries by running the 32-bit version in elevated mode ("as administrator") once.

3.) Run Daminion and select files as normal. In the Export flyout menu, select the exporter "Run Photoshop Script". This should give you a dialog as shown in the screenshot above.

4.) If the path to your Photoshop installation is not shown in the textbox, click the button next to it and use the folder navigation dialog to select the base folder of your Photoshop installation.

5.) Select the script you want to run (I recommend starting with the Image Processor.jsx script) and click the <Run Script> button.

6.) If all has gone well, Photoshop should start and present you with the main dialog of the script you selected, indicating the it is going to work on files from Bridge. At this point just run the Photoshop script like normal.

 

If you run into problems, please let me know, and I will see what I can do to help. I do not do much COM Interop work, so I am not sure how picky the Interop library will be about versions. I would be interested to know if this works with CS4 or CS6 without different Interop DLL's. If there is sufficient interest, I would be happy to give the code to Daminion Software or someone else who wants to polish things up.

 

Randy

  • Upvote 3
Link to comment
Share on other sites

Thank you for the nice Export Addon!

 

If you run into problems, please let me know, and I will see what I can do to help. I do not do much COM Interop work, so I am not sure how picky the Interop library will be about versions. I would be interested to know if this works with CS4 or CS6 without different Interop DLL's. If there is sufficient interest, I would be happy to give the code to Daminion Software or someone else who wants to polish things up.

 

Unfortunately Interop libraries are PS version sensitive.

We wrote a small utility named S.O.Linker that uses Photoshop Scripting to update Photoshop Smart Objects from external PSD files:

http://solinker.com/

 

We ship 5 different Interop libraries for different Photoshop versions - CS2, CS3, CS320061208b, CS4, CS5. (If someone has PS6 please send me it's Interop library).

 

And this issue required us to write Interop Wrapper Manager to manage different interop versions.

 

S.O.Linker automatically retrieves an installed Photoshop version from the Registry and launches an appropriate interop library.

Link to comment
Share on other sites

Thanks for the info on the Photoshop interop, Murat. I was afraid that might be the case. I think I could use your Interop.Common.BaseCSWrapper except for one problem: I need to be able to pass arguments to the DoJavaScript() method; that is how I pass the list of files to the script. If you guys could create a version that would pass the second parameter, the array of objects, through to the native Photoshop call, I would be happy to give it a try. Or, as I said before, I would be happy to send you guys my code. Whatever works best for you. For myself, I can live with the hard-coded Photoshop version since I try not to pay the Adobe tax too often; but I would be happy to work with you all to try to make the solution more general for others to use.

 

On a side note, I wonder if installing the trial version of Photoshop CS6 (perhaps in a VM) would allow you to generate the Interop library for it (and even get in some quick testing before the trial expires).

Link to comment
Share on other sites

Ok. I'll check the wrapper code regarding an extra parameter when I'll be at office. It shouldn't be a problem.

 

On a side note, I wonder if installing the trial version of Photoshop CS6 (perhaps in a VM) would allow you to generate the Interop library for it (and even get in some quick testing before the trial expires).

 

Yes. Interop from the beta version will be Ok.

 

Btw. On the same manner it might be to add ExifTool processor. This where command line interface has significant benefits over COM interfaces.

Link to comment
Share on other sites

Here is the Photoshop Interop helper libraries:

PhotoshopCSWrapper.zip

 

It also includes a sample project.

 

Supports Photoshop CS2, CS3, CS4, CS5 versions. If someone send me Interop.Photoshop.dll from CS6 I can include it also.

 

This helper class can:

- Automatically retrieves an information about the installed Photoshop versions

- Launch the latest or specified Photoshop instance

- Launch Script from a string or an external file

- Manage different Photoshop's Interop versions

- Supports logging

Link to comment
Share on other sites

  • 7 months later...
  • 3 months later...

wouldn`t it be great to make Plugins?

 

like, Photoshop Import, Media Streaming, etc.

 

so everyone could install what he wants

 

 

rene

 

Plugins is an excellent idea, and would invite independent contributions.

 

But then again, Daminion outshines other software because of its built-in feature-set. One could ask, 'Why would great software need plugins.. '

 

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...