Turning Bitmaps into Vector Graphics

I l @ ve RuBoard

After you've imported a bitmap into a Flash file, you can trace the bitmap to turn it into a set of vector shapes that look like the bitmap. Flash offers several parameters to help you strike a balance between the accurate rendering of the various color areas in the bitmap and the creation of too many curves and small vectors within one object, which increases the file size .

To trace a bitmap:

  1. Place a copy of the bitmap on the Stage.

  2. Select the bitmap.

  3. From the Modify menu, choose Trace Bitmap (Figure 7.10).

    Figure 7.10. Choose Modify >Trace Bitmap to convert a bitmap to a group of vector shapes.

    graphics/07fig10.gif

    The Trace Bitmap dialog box appears (Figure 7.11).

    Figure 7.11. The Trace Bitmap dialog box controls how Flash converts bitmaps to vectors.

    graphics/07fig11.gif

  4. Enter values for the four parameters in the dialog box: Color Threshold, Minimum Area, Curve Fit, and Corner Threshold.

    The parameters in this dialog box control how closely the vector image matches the bitmapped image. Flash creates the vectors by examining the pixels that make up the bitmap, lumping together contiguous pixels that are the same color and making a vector object out of that clump.

    Color Threshold (a number between 1 and 500) tells Flash how to decide when one pixel is the same color as its neighbor. The higher the threshold, the broader the range of colors Flash lumps together. A sky made up of light and dark blue pixels in three slightly different shades, for example, might wind up as one vector object if you set a high-enough threshold but might wind up as dozens of separate objects if you set a low threshold.

    Minimum Area (a number between 1 and 1,000) determines how many neighbor pixels to include in calculating the color.

    Curve Fit tells Flash how smoothly to draw the outlines around the vector shapes it creates.

    Corner Threshold tells Flash whether to create sharp corners or smoother, more rounded ones.

  5. Click OK.

    The Tracing Bitmap dialog box appears, with a progress bar and a Stop button. (To cancel the tracing process, click Stop.) Flash replaces the bitmap with filled vector shapes that imitate the image (Figure 7.12).

    Figure 7.12. These tracings use different settings. The top one closely imitates the original bitmap; the bottom one has a posterized effect but ends up at a much smaller file size.

    graphics/07fig12.gif

graphics/01icon02.gif Tips

  • For tracing bitmaps that are scans of photographs, Macromedia recommends settings of 10 for Color Threshold, 1 for Minimum Area, Pixels for Curve Fit, and Many Corners for Corner Threshold. These settings can result in really huge files, however.


I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net