Main Content

You are here:

Tracing bitmaps

Hello and welcome to another free Flash tutorial. Today, we're going to be looking at Flash's "Trace bitmap" function. Don't worry if you don't know what that does - hopefully the following example should clarify. In short, it's used for turn raster bitmaps into easily editable vector images.

The problem

Suppose I have created a little scene, and I want to add this public domain image of a dog to it. The image is a vector image. When I copy and paste it in, however, I find that Flash imports it as a bitmap: though the background is transparent, Flash has not honoured the original paths and other embed mathematical instructions on which bits are which. Sometimes, even the transparent background is not honoured, leaving a coloured background which is hard to get rid of.

A dog image, sitting as a square block on the background.

Consequently, if I tried to color in my (at the moment silhouette) dog, I would find that the paint bucket has absolutely no effect.

The solution

How can we colour in our dog? How could we remove any coloured background? The answer is to turn the image back into a vector shape. Though there are a few ways of doing this, the easiest way is to use Flash's built-in "Trace bitmap" function.

To use it, select your bitmap of a dog, then go to the "Modify" menu, then "Bitmap" and finally "Trace bitmap". You'll get a dialogue box that looks a bit like this:

The dialogue box, with various options.

It's generally useful to play around with the various settings (press "Preview" to test the output of each combination). In this case, though, they make little difference and the default works fine. Clicking okay converts the bitmap to a piece of vector art, which can then be easily manipulated.

An image of a dog, half one colour, half the other.

It is now possible to delete sections, fill them in with a gradient, apply useful shadows, manipulate the outline and apply shape tweens. The list goes on!

Well, I hope you've found this free Flash tutorial at least a little helpful.

Harry.

Comments