Data and photoshop, a match made in heaven
This week I’ve decided to post something a little different.
Working with data in Photoshop (CS3+) is probably not something you’ve thought much about. In fact, I’ve only ever run into one case where using datasets and variables in Photoshop made sense to me, but once you know how to use them, you’re bound to find more and more reasons to use them.
This approach is a timesaver regardless of the amount of data you might have, but if you’ve only got a few lines of data to work with, creating each PSD by hand might save time compared to this method.
- Mailing labels
- Custom postcards, flyers, etc.
- Creating ordered price or number-based images
- And so on…
First, we need some data to work with. For this example, I’ve created a simple list of names and addresses in Google Docs. The first cell of each column is important. We’ll use these names when we define variables to work with in Photoshop later on. Once my spreadsheet is ready, I export the file as a CSV.
Once we have our data, we’ll need to create something in Photoshop that can take advantage of it. With a list of names and addresses we could create custom envelopes, postcards, name badges, you name it. For this example, we’re going to keep it simple and create a Galactic Empire email signature graphic/mailing label sort of thingy:In the above screenshot you can see I’ve created a pretty basic PSD with the Galactic Empire Logo (Layer 1), five text layers and a plain white background layer. Now comes the fun part. Go to Image > Variables > Define. Select Name from the Layer dropdown.
We need to make sure that each column of data we have in our spreadsheet coincides with a variable. Select a Layer from the layer dropdown (such as Name). Then check the checkbox next to Text Replacement and set the name to Name, so it’ll match the column name from our spreadsheet. Continue doing this for each column/layer until finished.
Click the import button and it’ll open an Import Data Set window.Select the CSV file you’ve created. Make sure the checkboxes are checked. You’ll also want to make sure that you’ve already created your variable associations and the names match your column headings in the CSV. If they don’t match you WILL get errors.
You’ll now be able to select from the various Data Sets you’ve created and your PSD will get updated with the results. Once you click OK, save your document.
Now we’re turn each Data Set into its own PSD. Do this by going to File > Export > Data Sets as Files.
Select a folder for output. Set your naming convention. Click OK. In a matter of seconds you’ll have PSDs for every single data set.
Once you have a folder full of PSDs, your best bet would be tocreate an action that Saves for Web and then run a batch process that applies the action to each file. I’ll cover that in my next post.
Tony was the proud owner of OnWired, the web design agency he’s raised since birth in 2001. A designer-entrepreneur with a nose for trouble, he keeps his peeps on their toes and his sights focused on what’s next.
Since 2001, OnWired has delivered beautiful websites that make your business known. Don’t be shy, check out our work.
Latest posts by Tony Chester (see all)
- The 9 1/2 Best Digital Marketing YouTube Videos Under 10 Minutes of 2016 / 2017 - February 7, 2017
- Website Critique, Analysis, and Reviews - November 15, 2016
- Mobile Website Design Has Taken the Creativity Out of Web Design - August 4, 2016