Saturday, May 14, 2011

Week 3 Free Choice - Photoshop Scripting

Image by Flickr User: Dmitry Baranovskiy
So I learned a couple of new tricks this past week at work with Photoshop. I was always wondering if it was possible to automate things in Photoshop better than batch processing. Well I found out you can with Photoshop scripting. With JavaScript, VB script, or Apple Script, you can control things in Photoshop like creating layers, text, cropping, adding filters, etc. Basically if you can create loops and arrays in JavaScript, you can make some awesome things real fast in Photoshop. My task was to automate the creation of text on top of hundreds of images without having to painstakingly create the text from scratch. What I did was develop some code that opened up an image, added the text, saved the image and then closed the image. I used a text list and added it to an array, which in turn was used in a function to loop through the list and open every image in that list. There are still some things I want to work out, but this will change my workflow and make things so much easier in the future.

Here is some reference for those wanting to try it out:
http://www.adobe.com/devnet/photoshop/scripting.html
http://www.w3schools.com/js/default.asp
http://www.kirupa.com/motiongraphics/ps_scripting.htm

“the JavaScript Code” by Flickr user Dmitry Baranovskiy used under Creative Commons Attribution 2.0 license.  

0 comments:

Post a Comment