Vector Graphics Versus Raster Graphics

 < Day Day Up > 

Vector graphics have certain characteristics that are due to how they are stored by a computer. A vector graphics file contains the math to redraw the image onscreen. For example, a circle includes information such as the radius, the line thickness, and the color. All the graphics you create inside Flash are vector based. Vector graphics have two advantages: The file size tends to remain small (therefore, it downloads fast), and the image can be scaled to any size without any degradation of the image quality (a circle is still a circle, even if it's a large circle).

Vector graphics are great, but it's important to realize their disadvantages. Vector graphics require the user's computer to work hard to display the image (it has to do a lot of math), and vector graphics often look "computery" or antiseptic because they tend to involve geometric shapes. Both disadvantages can be overcome, but you should be aware of them.

Bitmapped graphics (also called raster graphics) are fundamentally different from vector graphics. A raster graphics file contains the color information for each pixel. If the image is 100 pixels by 100 pixels, that's 10,000 pixels, each of which has a color value. As a result, raster graphics are almost always relatively large files. Raster graphics also can't be scaled very effectively. They tend to get grainy, similar to a photograph that has been enlarged. An advantage of raster graphics is that they appear onscreen very quickly.

It might seem that vector graphics are obviously the better choice. However, the decision of whether to use vector graphics or raster graphics should be based on the nature of the image. If the image is geometric, with clear delineations of color, a vector graphic is a good choice. If the image is a photograph of a person or a geographic location, nothing but a bitmap will do. Selecting which format to use is pretty easy when you know the considerations of each type.

     < Day Day Up > 


    Sams Teach Yourself Macromedia Flash 8 in 24 Hours
    Sams Teach Yourself Macromedia Flash 8 in 24 Hours
    ISBN: 0672327546
    EAN: 2147483647
    Year: 2006
    Pages: 235

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