Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > BitmapData (flash.display.BitmapData) | |||
Object
|
+-flash.display.BitmapData
public class BitmapData
extends Object
The BitmapData class lets you create arbitrarily sized transparent or opaque bitmap images and manipulate them in various ways at runtime.
This class lets you separate bitmap rendering operations from the Flash Player internal display updating routines. By manipulating a BitmapData object directly, you can create very complex images without incurring the per-frame overhead of constantly redrawing the content from vector data.
The methods of the BitmapData class support a variety of effects that are not available through the generic filter interface.
A BitmapData object contains an array of pixel data. This data can represent either a fully opaque bitmap or a transparent bitmap that contains alpha channel data. Either type of BitmapData object is stored as a buffer of 32-bit integers. Each 32-bit integer determines the properties of a single pixel in the bitmap.
Each 32-bit integer is a combination of four 8-bit channel values (from 0 to 255) that describe the alpha transparency and the red, green, and blue (ARGB) values of the pixel.
The four channels (red, green, blue, and alpha) are represented as numbers when you use them with the BitmapData.copyChannel() method or the DisplacementMapFilter.componentX and DisplacementMapFilter.componentY properties, as follows:
1 (red)2 (green)4 (blue)8 (alpha)You can attach BitmapData objects to a MovieClip object by using the MovieClip.attachBitmap() method.
You can use a BitmapData object to fill an area in a movie clip by using the MovieClip.beginBitmapFill() method.
The maximum width and maximum height of a BitmapData object is 2880 pixels.
Availability: ActionScript 1.0; Flash Player 8
attachBitmap (MovieClip.attachBitmap method), beginBitmapFill (MovieClip.beginBitmapFill method)
|
Modifiers |
Property |
Description |
|---|---|---|
|
|
height |
The height of the bitmap image in pixels. |
|
|
rectangle |
The rectangle that defines the size and location of the bitmap image. |
|
|
transparent |
Defines whether the bitmap image supports per-pixel transparency. |
|
|
width |
The width of the bitmap image in pixels. |
Properties inherited from class Object
|
Signature |
Description |
|---|---|
|
BitmapData |
Creates a BitmapData object with a specified width and height. |
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
applyFilter |
Takes a source image and a filter object and generates the filtered image. |
|
|
clone |
Returns a new BitmapData object that is a clone of the original instance with an exact copy of the contained bitmap. |
|
|
colorTransform |
Adjusts the color values in a specified area of a bitmap image by using a ColorTransform object. |
|
|
copyChannel |
Transfers data from one channel of another BitmapData object or the current BitmapData object into a channel of the current BitmapData object. |
|
|
copyPixels |
Provides a fast routine to perform pixel manipulation between images with no stretching, rotation, or color effects. |
|
|
dispose |
Frees memory that is used to store the BitmapData object. |
|
|
draw |
Draws a source image or movie clip onto a destination image, using the Flash Player vector renderer. |
|
|
fillRect |
Fills a rectangular area of pixels with a specified ARGB color. |
|
|
floodFill |
Performs a flood fill operation on an image starting at an (x, y) coordinate and filling with a certain color. |
|
|
generateFilterRect |
Determines the destination rectangle that the |
|
|
getColorBoundsRect |
Determines a rectangular region that fully encloses all pixels of a specified color within the bitmap image. |
|
|
getPixel |
Returns an integer that reresents an RGB pixel value from a BitmapData object at a specific point (x, y). |
|
|
getPixel32 |
Returns an ARGB color value that contains alpha channel data and RGB data. |
|
|
hitTest |
Performs pixel-level hit detection between one bitmap image and a point, rectangle or other bitmap image. |
|
|
loadBitmap |
Returns a new BitmapData object that contains a bitmap image representation of the symbol that is identified by a specified linkage ID in the library. |
|
|
merge |
Performs per-channel blending from a source image to a destination image. |
|
|
noise |
Fills an image with pixels representing random noise. |
|
|
paletteMap |
Remaps the color channel values in an image that has up to four arrays of color palette data, one for each channel. |
|
|
perlinNoise |
Generates a Perlin noise image. |
|
|
pixelDissolve |
Performs a pixel dissolve either from a source image to a destination image or by using the same image. |
|
|
scroll |
Scrolls an image by a certain (x, y) pixel amount. |
|
|
setPixel |
Sets the color of a single pixel of a BitmapData object. |
|
|
setPixel32 |
Sets the color and alpha transparency values of a single pixel of a BitmapData object. |
|
|
threshold |
Tests pixel values in an image against a specified threshold and sets pixels that pass the test to new color values. |
Methods inherited from class Object addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001942.html
Comments
dubnet.co.uk said on Oct 9, 2005 at 3:34 PM : NZRoadKill said on Oct 14, 2005 at 2:27 PM : joeyinflorida said on Dec 14, 2005 at 11:15 AM : icktoofay said on Feb 10, 2006 at 10:04 PM : Flash-Ripper.com said on Apr 11, 2006 at 7:48 AM : jaredly2 said on Nov 20, 2006 at 12:07 PM : rachan@adobe said on Dec 4, 2006 at 4:38 PM : Ćukasz Grela said on Jan 8, 2007 at 3:00 PM : fillcell Gerra said on May 14, 2007 at 2:22 PM : webweber said on Jul 10, 2007 at 7:35 AM : extol said on Jul 29, 2007 at 11:30 PM : No screen name said on Aug 18, 2008 at 9:56 AM :