February 8, 2008
Modifying Photoshop Vectors
In the process of making very large icons, it’s increasingly important to use vectors (shape layers) to design icons rather than raster layers. Ever since i’ve been introduced to this feature I have not been able to go back to “ye olde raster layer” days. One feature that I’ve missed dearly since converting is the Select → Modify features. Using this feature, you can expand or contract your marquee selection by a certain number of pixels. This allowed for all sorts of possibilities such as making your own strokes, and consequently being able to style those any way you like. Today I’m going to show you how you can do this with vector shapes.
Modifying Selections
So first lets review how this feature works:
Make a selection using the “Marquee Selection” tool (M), create a new layer and fill the selection with your foreground color (Opt-Delete).
Then, go to the “Select” menu and under the “Modify” menu there are a few choices. We’re just going to talk about the Expand feature today, but I trust you will be able to figure the rest out on your own. So choose “Expand…” and enter the desired amount of pixels.
You should see that the selection has magically grown by the number of pixels you entered! Select a new foreground color, create a new layer underneath your first layer, and fill the new larger selection with your new foreground color.
And just like that, you’ve created your very own custom stroke!
The Vector Workaround
Warning: This workaround will require Adobe Illustrator.
Now let’s apply the same thing to vector shapes. First, create a rectangle using the “Rectangle Shape” tool (U). This should create a new “Shape Layer” filled with your foreground color.
Then, take the vector selection tool (A) and click directly on the path. You should see selected points on all the corners of your rectangle. Copy this path to the clipboard by pressing Cmd-C (or Ctrl-C on Windows).
Setting up Illustrator
First, if you haven’t already done so, open Illustrator. Go to Units & Display Performance in Settings (Cmd-K). Set the “General” property to “Pixels”. This will let you work with Illustrator in terms of Pixels rather than Points or any other Unit.
Now, create a new document with similar dimensions to those of your Photoshop file.
Modifying the Shape
Paste (Cmd-V) your shape into Illustrator. If asked what to paste it as, choose “Compound Shape”. You should see your shape from Photoshop in your new Illustrator document.
With your shape selected, choose Object→Path→Offset Path… from the menu.
You should now see the dialog above. Turn on the preview setting so you can see your changes in action, then go ahead and enter the values you want.
Offset
This controls how much your shape is offset. TIP: You can set a negative number to “Contract” your shape rather than “Expand” it.
Joins
This property controls what sort of corners you want.
- Miter
- A join that forms sharp corners
- Round
- A join that form rounded corners
- Bevel
- A join that forms beveled (or flat) corners
The default setting is “Miter” which gives you nice corners, but if you’re going for smooth, stroke-like corners try the “Round” setting.
Miter Limit
This property only applies to the “Miter” join setting. It determines which corners are shaped as mitered, and which corners are beveled. It’s probably best to leave this at the default setting.
When you’ve got the settings you want, click OK.
Deselect all objects (Cmd-Shift-A) and click on the new path that you’ve created. Copy this new path onto the clipboard (Cmd-C).
Putting it all together
Now, return to Photoshop. Paste the shape back into your document. If asked how you want to paste the shape in, choose “Shape Layer”.
Now line up your new shape with the original one and you’re done!
Benefits of Vector
There are tons of benefits to using vector for your work. There are a few downsides too, but that is a topic for a post of it’s own. Here’s how it benefits you to use this method:
Photoshop’s selection modifications are often times jaggy and not precise. Although this vector method takes more time, and requires Illustrator, it is much more accurate and smooth than Photoshop’s natural “raster” way.
I hope you enjoyed this little workaround. This is a feature I’ve been hoping Photoshop would include for years and maybe someday we’ll see it included. In the meantime we’ve got this workaround.








Great workaround :) I don’t use Photoshop for icon design any more, ‘cause of it’s lack of vector support. Illustrator FTW! :)
Nice post! It’s good to make this known, as it’s pretty retarded we have to use TWO 1000+ dollar apps to do this right now.
Good walk through. You can also change AI’s measurement units by bringing up the ruler (Cmd+R) and right clicking on it.
Wow, Josh, you’re my hero! This was pretty much the principal reason I hated using vectors; the lovely fine-tuned Expand and Contract selection tools made working with rasters so much easier. Thanks for the ProTip™!
Might I ask a horribly off-topic question regarding the desktop wallpaper you’re using in these shots? It looks nice!
You can also.. create the rectangle then ad layerstyle stroke to get the same effect. If you want the stroke to scale with the vector.. just make the rectangle with stroke effect a smart object. Or you can make the stroke from two different vector shapes. One bigger then det original rectangle.. then place the other one inside the first and set it to subtract area (-). This way you will have the stroke as it’s own object.
@robbish
A stroke is ok, but it doesn’t give you much flexibility. This is not just for making a simple strokes, but for making icons and other complex illustrations.
@garretmurray
http://macthemes2.net/forum/viewtopic.php?id=16783979
Yes, I understand that very well. Thats what I’m talking about. I use these techniques when creating icons. I’m refering to a vector shape whan I say “rectangle”. I’ts nothing wrong with your technique, there are other ways to acomplish this in photoshop, thats my point. I use both illustrator and photoshop and I’m thankful that you share your technique with us. Just felt I should add my own tip on this.
Hello! Did you ever been here?!
pixelmatrixdesign.com/secretpage
Try this 8-) Some pictures of our forum admin…
Why did I tell you that sercet info? Dont know.
Thank you for your website ;-)
I made on photoshop backgrounds for youtube, myspace and even more
my backgrounds:http://tinyurl.com/5ajonc
have a great day and thank you again!