Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Turning Photoshop layers into variables

From: Design the Web: Automating Web Graphics

Video: Turning Photoshop layers into variables

Now to begin our project, let's open up banner.psd from the exercise files. Now, the font family that I used in this composition is Helvetica Neue, And now with our Photoshop file open, over in the Layers panel, We also have a Text layer called Aruba.

Turning Photoshop layers into variables

Now to begin our project, let's open up banner.psd from the exercise files. Now, the font family that I used in this composition is Helvetica Neue, and I used a series of different weights from this particular font family. But if you don't have access to Helvetica Neue on your system, you can substitute this with something like Myriad Pro, Frutiger, or Avenir. And of course you can use any font that you have on your particular system. And now with our Photoshop file open, over in the Layers panel, here you can see how this file is put together. At the top, there's a folder called travellogo. Inside of here, there's a vector shape and a Text layer.

These are set to a style of Multiply for the blend mode. We also have the Fill set of 65%, and they each have a stroke applied to them as well. This way regardless of the photograph that's showing up behind them, having a black logo with a white outline, should give us a logo that's pretty recognizable over a series of different photographs. We also have a Text layer called Aruba. We have our tagline here. We have our small Type layers inside of the white box here, are starting from and per person. Next we have a Text layer called View Deal in a black box.

We have a Text layer here that's showing the price. We have our white box, and we have a photograph in the background. So everything in here is just standard Photoshop layers. Now the first thing I want to do is I want to set this up so that the Type layer here is actually showing as a cutout through this white box. Now how we typically might do this, would be, we might select. Holding the Cmd key click on the Text layer, select the outer shape of the text. Hide this. Come over here to the white box. Add a layer mask. And with the layer mask selected, hit Cmd or Ctrl+I to invert that.

So this is the effect that I want. However, I do want to be able to set the type, and I can't use a live type layer as the mask for this particular shape. So let's delete the mask. And what I'm going to do instead is take this Photo layer. I'm going to hold the Option or Alt key, click and drag, and bring a copy of the Photo layer up above the Type layer. Now with that in place, let's hold the Option key or the Alt key. Let's click between the layers to create a clipping mask.

So what this does is give us the same effect of a cutout, but we're actually using two different photo layers and we can keep our type live. So if we come in here, for example, and change the type, let's change this to $0, we get the effect of the type acting as a cutout through that white box. So let's come back to the Layers panel. Let's take that layer that we duplicated called Photo, and let's rename this photo space clipped. Next, let's come over to the Text layer Aruba. Let's put in the word City instead. Next let's come down to our foreground color swatch.

Let's come in here and select a medium grey. Click OK. And then what I want to do is come down and select the Photo Clipped layer. Let's come up to the Edit menu, let's choose Fill. We're going to fill with foreground color just to make that gray. Next, let's come down to the Photo layer. Let's fill that with grey as well. You can use the shortcut Cmd+Option or Alt + Shift + Del. So now we basically have this generic file. Now we're going to come up to the File menu, let's first choose Save. Then we'll come up to the Image menu, let's come down to Variables, and let's come down and choose Define.

Now this dialogue box gives us the ability to take layers in Photoshop and assign them to be variables. So first here come here to the Layer drop-down menu, when I open this up, you'll see all of items match all of the layers in the Layers panel. So let's first come down to the city layer, and down here we can choose what type of variable this is. Let's come down here and activate text replacement. This means that we can reassign all of the characters that are used in the City Text layer. So let's come down here and give this a name, so I like to name these something that is going to make sense to me inside of my text file. So let's name this city, all lower case.

Next, let's come down and choose the $0 Text layer. We want to text-replace this as well. And let's name this Price. Next, let's come over to the Layers drop-down menu, let's come down and choose the Photo layer. Now this is a layer that has pixel data on it, not typography. So let's come down and activate Pixel Replacement for this. Let's come down and name this PhotoBase. Now we have some fitting options down here as well. So if we were to bring in a JPEG file that was not the exact size of our canvas, we can choose how Photoshop will fit this content.

So there's Fit, there's Fill, there's As Is. And when you roll over this, you'll get a little preview down in the lower right, and then we have Conform. And these fitting options are very similar to what you see inside Adobe InDesign if you use InDesign. So we're going to come up here and chose Fit because the JPEG files we're going to load in are going to be the exact size of this Photoshop canvas. Next, let's come up to the Layer drop-down. Let's come into Photo Clipped. Let's activate Pixel Replacement here, and we're going to call this one photoClip. Then we're going to click OK. Let's come up to the File menu, let's save our file one more time.

So now at this point we've taken our Photo layer, our Photo Clipped layer, our Text layer for price and our Text layer for city, and we've turned all these into variables. And with this in place, next we'll assign data into those individual variables so that Photoshop can then change the canvas based on that data.

Show transcript

This video is part of

Image for Design the Web: Automating Web Graphics
Design the Web: Automating Web Graphics

8 video lessons · 4026 viewers

Chris Converse
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Design the Web: Automating Web Graphics.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.