Chapter 15. Working Directly with Bitmap Data
A bitmap image is a graphic that is created using a grid. The grid is a set of pixels, each with a defined color. When you zoom in on a bitmap image, the grid is obvious. Zooming in on a bitmap causes the pixilated look you've probably seen on resized or low-resolution images. Bitmap images are different from vector images in this way. A vector image is defined by points. As a vector image is scaled, the points remain in the same relative position. Lines and fills are drawn between these points as the vector is scaled. Because the lines and fills are redrawn, no pixilation occurs. When vector images are converted to bitmaps based on their current scale within a specified pixel area, they are referred to as rasterized graphics.
Before Flash 8, Flash could not directly manipulate bitmap graphics at the pixel level. Flash has always been able to display bitmap images and modify them as a movieClip object, but ActionScript was never able to fetch the pixel information and work with the pixels directly.
Flash 8 represents a massive maturation of the Flash player capability. Flash can declare anything a Bitmap object. That is, even a vector image can be rasterized in a split millisecond to perform per-pixel operation changes at runtime. You can even convert a movie clip to a bitmap so quickly that you can rasterize vector animations, videos, webcam feeds, and more. You also can work with their pixels and apply filters to them as they play, giving ...
Get Beginning ActionScript 2.0 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.