User Guide

Performance optimization 73
Vector graphics are compactly described in SWF files as mathematical equations, and then
rendered at runtime by the Flash Lite player. In contrast, bitmap graphics are represented as
arrays of picture elements (pixels), which require more bytes of data to describe. Therefore,
using vector graphics in your application can help keep file size and application memory usage
down.
Vector graphics also maintain their smooth shapes when scaled in size, unlike bitmaps images
that can appear boxy, or pixelated, when scaled.
Compared to bitmaps, however, vector graphics require more processing power to render,
especially vector graphics that consist of many complex shapes and fills. Consequently, heavy
use of vector shapes can sometimes reduce overall application performance. Because bitmap
graphics dont require as much processing time to render as vectors, they can be a better choice
for some applications. For example, a road map of a large city would have too many complex
shapes to scroll and animate well on a mobile phone if it were created as a vector graphic; a
bitmap would animate better.
Following is a list of additional considerations for using bitmap and vector graphics in your
Flash Lite application:
Whenever possible, do not use strokes on your vector shapes, because doing so increases
the number of rendered lines.
As a general rule, use bitmaps for small, complex images (such as icons) and vector
graphics for larger and simpler ones.
Import bitmap graphics at the size that they will be used in the application; dont import
large graphics and scale them down in Flash, as this wastes file size and runtime memory.
Setting bitmap compression options
If you use bitmaps, you can set image-compression options in Flash that reduce your SWF file
size. You can set bitmap compression on a per-image basis or globally for all bitmap images.
To set bitmap image compression:
1. Start Flash, and create a document.
2. Select a bitmap in the Library window.