Converting Bitmaps to Vectors in Flash

by Andrew Mall

 

The following directions enable you to add a bitmapped graphic as a vector graphic to the library of the current Flash movie. You can also use these directions to convert a bitmap directly on the stage, without adding it to the library.

 

  1. Select Insert > New Symbol (Ctrl + F8)
  2. Name the symbol, and select Graphic as the behavior
  3. File > Import (Ctrl + R) the bitmap graphic you want to use
  4. With the graphic selected, choose Modify > Trace Bitmap
  5. Enter a Color Threshold value between 1 and 500 - When two pixels are compared, if the difference in the RGB color values is less than the color threshold, the two pixels are considered the same color - As you increase the threshold value, you decrease the number of colors
  6. For Minimum Area, enter a value between 1 and 1000 to set the number of surrounding pixels to consider when assigning a color to a pixel
  7. For Curve Fit, select an option from the pop-up menu to determine how smoothly outlines are drawn
  8. For Corner Threshold, select an option from the pop-up menu to determine whether sharp edges are retained or smoothed out
  9. Click on Scene 1 in the upper left corner (below the menu) to exit symbol editing
  10. You can now delete the bitmap from your library - the vector is in the library for you to use at will

 

I recommend playing around with the different settings to achieve different effects. For a vector image that looks closest to the bitmap, use the following settings:

For a more cartoon-y effect (for example, the personae images) raise the color threshold and area values, and lower the curve fit and corner threshold settings.

 

Note that you can import vector graphics from other programs (Fireworks, Freehand, Illustrator, Corel Draw, etc.) in .swf and .png format, but they are more difficult to edit than a vector graphic created natively in Flash itself.