Photo Collage Toolkit Details

Rule Details

  1. Size the photo collage templates for the print size you want - width, height and print DPI resolution. Normally a print size like 8" x 10", 11" x 14", 16" x 20" at 300 DPI for printing.
  2. Both types of photo collage templates with and those with out mats must have a Photoshop background layer. Its contents can be anything. This background layer should not have any adjustment layer clipped to it. If needed adjustment layers can be added to the background layer of the populated template copy.

    During Images population images are inserted into the collage by adding smart object image layer with layer mask. Insertion starts directly above the required Photoshop background layer and additional images are inserted on top of the previous inserted image.

  3. Besides the required Photoshop background layer, photo collage template files are required to have alpha channels named "Image 1", "Image 2", ... "Image n"

    These alpha channels make it possible to use Photoshop's automation features to facilitate image placement, sizing and masking. My automation processes require image alpha channels that map image collage placement locations and they must be named sequentially "Image 1". "Image 2" ... "Image n". These are used to provide placement guides while a collage is interactively populated and to mask image layers so only that area of the layer will show. Think of these alpha channels as a cropping mask. Templates will be populated with images using the Photoshop File Place feature. Place supports all supported Photoshop image file types RAW, PSD, Jpeg Tiff etc. Used in an interactive mode, "Place" will put the user into a place file dialog window where they can select which image is to be placed. After selecting an image, the user clicks the "Place" button. Photoshop then places the image file into a layer in the collage being populated. User interaction continues in the place transform dialog where the user can position the image over the collage area the alpha channel maps to and they can size the part of the image they want in the collage. This transform will resample the Photoshop smart object layer to the required DPI. Image place into collages should be transformed so they cover the area the alpha channel maps to, whatever its shape is. Image files will be placed into collages in order of image 1, image 2, ... image n. Each populated image is a Photoshop smart object layer with a layer mask. This makes it possible for users to re-transform image, tweak cropping and framing after the automation process is run without losing image quality. The placement area size and shape is defined by the alpha channels "Image 1", "Image 2", ... "Image n". These channels may overlap. In fact the Photo-board type photo collage templates is where small images are placed on a large image. The alpha channel "Image 1" defines the large image area. It will be the same size as the photo collage or slightly smaller to leave a border. The rest of the image alpha channels will overlay parts of Image 1. Individual images layers may overlap. Higher image numbers are on top of lower image numbers in the Photoshop layer stack. In fact, all that is needed for a Photo-board type collage template is the background layer and the required Image alpha channels.

  4. Additional layers above the background layers can contain anything as long as they provide transparent areas to let the images placed above the background layer to show through.

Rules for photo collage templates that have pre made mats are identical to photo-board type template rules. These pre made mats type template PSD files will always have at least one layer above the background layer for the pre made mat, where photo-board type template may or may not have any layers above the background layer.

The image alpha channels map the areas the inserted image will occupy in the collage. For example, alpha channels for pre made mat type collages match the image openings in the pre made mats. Image alpha channels can be any size and shape..

I believe that many existing Photoshop templates could easily be edited and by just adding my required "Image N" alpha channels, they would comply with my rules and be useable with my tools.

Photo collage template PSD files can be stored anywhere on your system. I store mine in "C:\Program Files\Adobe\Adobe Photoshop Templates\Collage\". This is not an Adobe directory. It is one I created for the storage of my photo collage templates.

With these four rules in place

  1. I was able to easily create generic collage actions to test new photo collage templates while they are being developed.
  2. Create generic collage actions to populate photo collage templates psd files.
  3. Create actions that you copy and rename to the name of a template which you then play. The first time you play this new action it will help you modify it to populate the template it was named for.
  4. Inserting flat images can create boring collages so I created actions to Add a layer style to image layers to add some class to photo collages.

Photo collages template need not have frames. If you want to add frames, my custom framing actions can be used to frame a collage. Examples and Documentation plus Downloads.

The problem with actions is they cannot contain logic. For example logic to find out things like how may images it should insert into a photo collage template. Collage populating actions can only be created to insert a set number of images into a collage. So I created a serious of actions to work on templates that contain 1, 2, 3, ...9. So only collages containing 1 through 9 images were supported by my toolkit.

To be able to handle a collage template with any number of images would require the use of Photoshop scripting. Scripting is hard work and in this case its even harder for some things that are easy to do. Actions can not be done with Photoshop scripting. However actions can use scripts to do things actions can not do on their own. Scripts can play actions to do things they can not do. `

Still scripting is hard so I first created a script to populate a one image collage template. Since I was scripting, I thought it would be easy to also have the script size and position inserted images and even batch populate the collage template by saving the populated collage into a destination folder. Then remove all the layers added to the collage template and then move onto the next image in a source image folder. I named this script Batch One Image Collage.

It proved to be much harder then anticipated to program this script. Turned out it was hard to come up with a way to find out the bounds of the image.

Once I had programmed that script it was easy to program a script that could automatically populate collage templates that contain one or more image alpha channels. Named that script Batch Multi Image Collage. While I could now automatically populate any collage template, I am not able to determine the shape of an image alpha channel to see if an image may need some rotation to work better with the current image alpha channel.

So I then programmed a script to interactively populate a collage template like my actions populate photo collages templates. This required me to create some actions the script would need to play to change the image view Photoshop would preset to the user and to help with making the script interactive. While you can program interactivity into scripts, sometime it is just easier to use an action that had an insert menu item like menu File>Place. The name of this script is Interactive Populate Collage. Later I used Xbytor's script ActionFileToJavascript to convert those actions to script code. Xbytor is an expert where I'm a hacker. He has developed an extensive set of tools for Photoshop scripting called Xtools.

While programming these scripts, I added some options for things like stamping filenames onto the inserted images or collage. File saving options and pull-down menu for things like fonts and layer styles.

These four scripts: InteractivePopulateCollage, BatchOneImageCollage, BatchMultiImageCollage and TestCollageTemplate have obsoleted the need for my old toolkit actions. So I removed my old actions from the package though the TestCollageTemplate script can be used to test photo collage template youíre currently making. IMO photo collage templates are so easy to create this script is not needed. However, you can also use this script in an action to interactively populate a photo collage template without a menu. The actionís first step would be Open photo collage template to be populated. followed by menu file>scripts>TestCollageTemplate followed by select previous document and finally close no save. Look at the Baseball Card action in the JJmack's Photo Collage Toolkit Scripts action set.

Auto Populating Collage Templates

In a production environment, being able to populate collages without user intervention should be very productive. Auto Populating Collage is also easier and faster then doing it interactively. The resulting Collage PSD files can still be tweaked. The first script ("BatchOneImageCollage.jsx") can automate the population of Photo Collages templates that only have one image placed into them for example, a special frame, a baseball card or a magazine cover type of collage may have. This script has options that can be use to have the script stamp the image file name on the image or on the Collage. The second script can populate any Photo Collage Template. Its file name stamp option will only stamp file names onto the image within the collage.

I was asked by a user to provide a script that would populate a template and not save the populated collage. To just end the script and leave the collage open in Photoshop. So they could continue to work on the populated collage. I created a script named PopulateCollageTemplate to do that.

Image File naming and placement order

Images are placed into collages from folders by the batching scripts in filename sort order. To allow you to control the order of image placement, you can prefix the Image Name you want stamped into the collage with a prefix sequence number followed by a "#" character. File Systems file name may be up to 255 characters in length and can not contain the special characters <>:"/\|?* So I could do something like this for file name (Sequence number,Collage Title,Image annotation#Image Name) in the future. You should also not expect a long name stamp to fit with the collage. As of now I just strip off everything up to and including the "#" before stamping the remaining part of the file name into the collage. This is also true in the interactive script. So right now you can use the prefix area anyway you want. However that may change in the future. The Collages templates themselves are populated in the order of the alpha channels "Image 1, Image 2, ..., Image "n" with the lower image number layers below higher number layers in the layers stack.

Script Dialogs

Many of the scripts dialog start with an input field for setting the Photo Collage Template file path. The batching scripts dialogs followed the template field with two fields used to set the folders to use in the batch process. The first folder path is the source image files folder. The second is for the path to store the populated collages into. These setting are recorded and will stick. The lower area of the script dialog contains options the scripts supports. These settings are not recorded. You must set the ones you want to use each time. So I did not want to have too many options so I hard coded some additional options in the script. They can only be changed by editing the script and customizing these hard coded settings. These are set in the beginning of the script. The Photo Collage Toolkit Preferences Script is used to customize the default setting ant to add additional Layer Styles for Text layers and Image Layers. Use a text editor to make default settings changes and to add your own layer styles. The script just set javaScript variables. Do not delete any or change their names.

/////////////////////////CUSTOMIZE Here/////////////////////////////////////////////////////////////////////
// Some Hard Coded variables that some day I may put into the dialog options area

var imageStyleList = ['Default Style (None)','Photo Collage Style 1','Photo Collage Style 2','Photo Collage Style 3','Photo Collage Style 4','Photo Collage Style 5','Photo Collage Style 6','Photo Collage Style 7','Photo Collage Style 8','Photo Collage Style 9'];
var imageStyleDefault = 0;                           // imageStyleList index number

var textSizeFactor = 2;                                 // > 1 scales down text size
var textAngle = -10;                                     // centered text line angle
var textColor = new SolidColor;                  // text color default white 255 255 255 = 255; = 255; = 255;
var textStyleList = ['Default Style (None)','Shiny Metal','Shiney Metal No Stroke','Strong Metal','Strong Metal No Stroke','Clear Emboss - Inner Bevel','Clear Emboss - Outer Bevel','JJMack Overlay'];
var textStyleDefault = 0;                            // textStyleList index number
var textLocationDefault = 7;                      // text Location Default Bottom Center

var templateFolder = "C:/Program Files/Adobe/Adobe Photoshop Templates/";   // Used by InteractivePopulateCollage,BatchOneImageCollage and BatchMultiImageCollage
var imagePath = "~/My Documents/My Pictures/";                                               // Used by InteractivePopulateCollage and TestCollageTemplate

// End hard coded variables
[ Dialog ]