Photoshop: Converting Raster Images to Custom Shapes

One of the most useful tricks of our trade is the ability to convert within Photoshop a raster image to a custom monochromatic shape.
What’s the use of that? First of all, as you can understand, whenever you bring up the size of your shape, it never looses it’s “quality”, in other words it doesn’t pixelate like raster images do as you pump up their size.

The downside of that is that the shapes produced are monochromatic only; you cannot turn a full color image to a full color vector shape by doing the following procedure. Nevertheless it is a very useful technique that produces stylized monochrome graphics, mostly useful in applications where large scale printing is needed afterwards, eg. monochrome logos: you will be able to scale up to any size your logo without loosing on the image’s quality.

Finally it’s a fine technique when you need repeated elements within your work, like your signature: you can scan in your signature and turn it into a custom shape and therefore be able to use it again and again!

I never thought this was possible, but around 4 years ago a work colleague and real veteran in Photoshop has taught me the following relatively quick and easy technique.

Before we start, I assume that you have a fair understanding of shapes, paths and the colour channels palette within Photoshop. If you don’t know about paths then I suggest you skip this tutorial for a later date and visit this page to learn about them! Click on the following images for their full version.

[1] Open up your image in Photoshop, take care so that your image is something simple; a well focused subject in the foreground with a simple background works best in this technique. The next thing you might want to do is to isolate your area of interest in the image from the rest, by masking it either by the classic masking tools or using the pen tool. Today’s victim is a sexy Lamborghini Miura on which I have her background removed. I also have copied only the car to a new layer and applied a black stroke on the Layer’s styles so that the car is clearly outlined, which will help define it’s shape within all the white areas, as you will see later on. At the moment my image is only one layer and flattened:

[2] Go to IMAGE > MODE > GRAYSCALE and convert it to a grayscale image without any color:

[3] In most cases you might want to tweak the image a bit more so it looks as close to your desired monochrome effect. Go to IMAGE > ADJUSTMENTS > LEVELS (or hit CTRL+L) and tweak your image so that it looks as close to the monochrome effect you want in the end. — Alternatively you can use the Threshold processing (IMAGE > ADJUSTMENTS > THRESHOLD) to do the same thing:

[4] Optional: Clean up the pixel spots on your image, this is not mandatory, but it will reduce the vector nodes later, plus it will crispen out your image more:

[5] Optional: Go to FILTER > BLUR > GAUSSIAN BLUR and apply a tiny bit of blurring, usually something tiny like 0.4 works fine, it will lessen the pixelation and smooth out your image, Alternatively you could try going to FILTER > STYLIZE > DIFFUSE and check ANISOTROPIC on the preferred method of processing – this works best with large images:

[6] Go to your Channels palette, right click on the Gray channel and select Duplicate channel. A dialog appears, rename to channel duplicate if you wish and select OK:

[7] With your new channel selected, go to SELECT > LOAD SELECTION > OK :

[8] We need to inverse our selection, so only the black areas are selected, to do this go to SELECT > INVERSE (or hit CTRL + SHIFT + I)

[9] Now go to your paths palette and click on the Make Work Path from Selection button (3rd from the right) on the buttons which are located on the bottom of the paths palette. This is the key operation of this technique as it transforms our raster selection to paths:

[10] Make a new layer above the old one and fill it with white. Select black or any other color for your foreground color (apart from white obviously!!!):

[11] Go to the paths palette, select your work path, right click on it and select FILL PATH (select use foreground color on the top of the dialogue) and voila! You have your first vector shaped copy! Also note how the black outline that I have applied upon preparing the image clearly defines the shape of the car:

[12] Now to take the process one step beyond, you might want to save that shape for later use. With your work path selected go to EDIT > DEFINE CUSTOM SHAPE, name it and it’s saved for you. Don’t forget to save your custom shapes palette, if you want to keep this for later:

The beauty of this technique is now that you have your custom shape ready, try creating it on a huge size image (3-4 times more than your original) and you will see virtually no loss of quality, or pixelation!

And don’t forget to experiment for ultimate results!

(Especially when adjusting the image’s levels, it is an area you can try a few different settings! Hint: You can use more than one copies of the same layer with your base image so that you can achieve various levels of black and white shape definitions and combine all layers later on! Just remember to keep the good areas and erase all the unwanted parts, which can be a bit tricky and tedious…)

I hope that helps, enjoy ๐Ÿ™‚


22 Responses to Photoshop: Converting Raster Images to Custom Shapes

  1. Geoff James says:

    A fantastic turorial – I’ve been wondering how to form custom shapes from rasters for quite some time! Thank you so much! GJ

  2. vagpod says:

    I’m very glad you found it useful Geoff and thank you for your time to leave a comment ๐Ÿ™‚ Cheers!

  3. Charlie says:

    Thank you for the great tutorial. Your provided me with just the information I was looking for.

  4. vagpod says:

    You’re very welcome Charlie! I’m Glad that you found what you were looking for!

  5. Sneha says:

    Hey thanks a lot. i’ve just started with Pshop. This helped me a lot !!

  6. vagpod says:

    I’m glad you found it helpful. Check back often to learn new things ๐Ÿ™‚

  7. key says:

    This is a great tutorial! Unfortunately, every time I try to use this, Photoshop draws paths that don’t line up correctly with the image. With typographic images, this is especially frustrating. Oh well. I guess I’ll stick to rasterized images.

  8. vagpod says:

    Key I’m afraid that this is not the best method for vectorizing typographic images. It really screws the lettering. Try tracing those images with illustrator or Corel Draw.

  9. GeeKay says:

    Thanks for this – it was just what I was looking for to vectorise elements from a logo at work that was only available as a jpeg. Great work.

  10. wonderjosh says:

    Oh man, I’ve been wondering how to do this for a long time! Thanks!

  11. Grateful says:

    all I can say is thank you and THANK YOU!

  12. cubism says:

    What’s the difference in effect between step five itself and skipping step five but ticking “anti alias” in step eleven?

    you make no comment as to the state of the anti alias checkbox in step 11.

    • vagpod says:

      Using antialias in step 11 is a matter of personal preference. You can use it if u want.

      Steps 1-5 is basically the preparation of the bitmap to be vectored, once again if you skip step 5 or not it is up to you. However step 5 softens the rough edges of the black and white image and eliminates most orphaned black pixels and unwanted clutter.

      Once vectored, having the path filled with antialiased edges has nothing to do with step 5. Antialias will affect only the area filled within the path. Step 5 affected the image from which the path was made, it’s a “before” and “after” state really.

  13. cubism says:

    once a custom shape (as shape layer) is used as a clipping mask how can one soften/blur the edges of the visible pixel layer


    • vagpod says:

      Very easily: click on your clipping mask layer and apply a Gaussian Blur (FILTER > BLUR > GAUSSIAN BLUR) up to the setting you want to. Usually to mimic the antaliasing of the edges you need a tiny amount of blur.

      I hope this answers your question

  14. cubism says:

    oh and


    I can now save doodles as shapes!!

  15. anulubi says:

    thank you so helped me to improve my theme making talend

  16. Is it necessary to fill the layer with white on step 10? I am looking to make a logo, so I want the background to be transparent. Is that feasible, or will the technique not work without a white background?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: