Flash Tip: Trace Bitmap

Flash Tip: Trace Bitmap
 Adrien-Luc Sanders/Getty Images 

We've talked about creating a character of movable parts, mainly by breaking the parts down into transparent GIFs in Photoshop and then importing them into Flash.

Leaving Artwork in Bitmap Format

In the lesson, we chose to leave our artwork in bitmap format, but this can greatly increase your file size and make your animation tweens a little bit rougher, as well as cause a pixelated effect if the raster image is resized in Flash.

Artwork Is Preserved in Its Original Format

The advantage to staying in bitmap format is that your artwork is preserved in its original format, down to the pixel; however, if you have clean artwork or at least solid color blocks, you can use Flash's Trace Bitmap function to convert your artwork from raster/bitmap to vector format, which will save file size and allow for easy resizing.

Trace Bitmap can be found on the main (top) toolsets, under Modify >Trace Bitmap. After importing your bitmap/jpeg/gif artwork into Flash, you would drag it from your library onto your canvas, select it, and then choose this option. The dialogue window that comes up lets you customize just how closely Flash tries to render the vector artwork based on the original, as the Trace Bitmap engine picks out solid color areas and converts them to vector fills (including your linework).

  • Color Threshold determines just how closely Flash will try to match the colors in your artwork. The lower the number, the closer the match; in a detailed image, this will create several separate interconnected fills that mesh to make the full image.
  • Minimum Area defines the smallest area of Color that Flash will recognize (in pixels). For example, if you set your Minimum Area to 3, then Flash will convert any solid color blocks of three connected pixels or more into a color fill; anything under three pixels would end up being absorbed into the nearest larger color block. (Say if you had a single black pixel in the middle of a white field, and your Minimum Area was set to 2—the black pixel would vanish in a white vector fill.)
  • Curve Fit determines how Flash follows the curves of your artwork. Because Flash uses vector-based artwork, outlines are generally defined by paths, which can conform to curves either loosely or tightly but may require more anchor points (making them more detailed and difficult) if they're conforming tightly to an irregularly outlined object. If you set the curve fit to Pixels, then the edges of the fills will conform to every last pixel edge. Other options range from "Very Tight" to "Very Smooth," which controls to what varying degrees that Flash will automatically smooth the edges to the nearest curve.
  • Corner Threshold is another option that controls the smoothness of your bitmap trace; the paths defining your shapes aren't always curved, and at times the defining points cut off in corners. The corner threshold defines how many corners—that is, how many of your sharp edges get smoothed out. If it's set to "Normal", then Flash will average out, making some sharp corners while smoothing others; "Many Corners" and "Few Corners" are fairly self-explanatory.

You can also try using this not just on artwork for animation, but on photographs or drawings for backgrounds or graphical user interfaces. You won't always get a perfect match, especially on highly complex work, but the posterized effect generated can be rather neat as well.

Was this page helpful?