Adobe Photoshop Scripting

I’ve used Adobe Photoshop for a while now and never really progressed beyond the basics.  That is, until recently, when faced with the challenge of putting together a collage image for an Enterprise Search presentation that I’m working on.  The idea for the image was not mine.  I saw the document icon collage idea when researching online material.  Of course, I sought to acquire an acceptable copy of the image but, to no avail.  So, I designed my own, shown here:

document_icon_collage_med

Clearly, with very basic Photoshop skills in hand, the prospect of inserting and aligning different sized document icons, in random order, was daunting to say the least.  And, even worse would be the prospect of having to redo the layout if either the results were crap, or different icons or icon arrangements were needed.  One could easily end up going blind and getting carpel tunnel syndrome.

Automation was needed and this is where Adobe’s ExtendScript Toolkit saved the day.  The toolkit provides a scripting editor where you can write ExtendScript to manipulate and build a Photoshop image.  ExtendScript is Adobe’s extended implementation of JavaScript, so anyone familiar with JavaScript will have no problems writing ExtendScript.

So, putting my geek hat on, and with the ExtendScript Toolkit to hand, my high-level approach was as follows:

  1. Create two different sized sets of icons.  Each set stored in their own folder.
  2. Create the framework image which contains the effects layers (e.g. shading, shadowing, etc) and separate layers for the icons: small icons collage, large icons collage, and the spotlighted icon.
  3. Write an ExtendScript function to open the icon image files and randomly copy each icon image (from the “pool” of opened icon images) into the icon layer in aligned rows, repeating until the entire image is covered.  The function would be run for each icon collage layer.
  4. Manually add in the spotlighted icon as an “illuminated search hit”.

Now, I have script that I can reuse to build alternative icon collages or build other type of collages.  The script has literally saved me hours and hours of work.

Maybe there’s way of easily achieving the same thing without resorting to scripting?  If so, please let me know.

Get in touch if you’re interested in more details about the script implementation.

Technorati Logo , , , ,

1 Response to “Adobe Photoshop Scripting”


  1. 1 Jame Healy

    Steve … I’m … impressed.

    Maybe you should add Graphics Designer to your long list of accomplishments and credentials!

Leave a Reply