Photoshop
…and how the script came to be
I’m not really a Photoshop expert. I’m not even a power user… but when I needed to automate the stuff I do with my pictures, I sat down and found out how to do it.
I wanted to resize my pictures to 1024x768 (or 768x1024 if the picture was portrait-oriented), put a small (2px) black border around it, than a bigger (70px) white border around it, and then put my DeviantArt URL - http://allixsenos.deviantart.com - on the bottom border. I also wanted to put the name of the picture on the top border.
I started poking around Photoshop and found Actions. They are pretty cool, but they can’t handle if-then clauses… but I managed anyway, and it was kludgy.
Luckily, I noticed my good friend Duke on ICQ and asked him for help. He sent me a Photoshop script (written in JavaScript) that put the picture filename on the center of the picture and thought it would help me get where I’m going… It sure as hell did.
I modified it, extensively, and now I’m not ashamed to call it my own because it does a lot more than the original script did. I still thank the original author, Sean Harding, for the original script and setting me on the right path.
…what the script does
the script, right now, does the following:
- resizes the image to 1024x768 (or 768x1024, depending on the orientation of the image)
- puts a 2px black border around the entire image (can be configured to make the border white, size can also be configured)
- puts a 70px white border around the entire image (can be configured to make the border always black or always white or always ask which color to use during execution, size can also be configured)
- puts a static text signature to the center (vertically and horizontally) of the bottom frame. the text can be configured in the script
- puts the image name to the center (vert. and horiz.) of the top frame. the default behaviour for the script is to ask you for the picture name and then put the name on the picture. it supports prefix and suffix texts for the image name. the default is ‘~ ‘ for the prefix and ‘ ~’ for the suffix. this can be changed in configuration. the script can be also configured to never ask for the picture name and use the filename by default.
If the outer frame is black, the text is automatically white.
…what the script doesn’t do
the script, currently, does NOT do the following things I’d like it to do:
- preserve aspect ratio of the picture. the result will ALWAYS be 1024x768
- allow for different target resolutions at run-time
- allow for right- or left-aligned texts on top and bottom
- allow for different font size and type for the top and bottom text
- better color handling
things the script will probably never do:
- I’m pretty sure I’ll add some stuff here once I start recieving wishes from people using my script
…revision history
v1.1a 2004-09-05
* the script is now licensed under the Creative Commons License
* visit http://creativecommons.org/ for more information.
v1.1 2004-09-03
* added prompt for picture name, config vars and tuned it a bit
v1.0 2004-09-02
* original version






