Adobe Flex 3 Help

Taking advantage of mipmapping

MIP maps (also known as mipmaps), are bitmaps grouped together and associated with a texture to increase runtime rendering quality and performance. Flash Player 9.0.xx.0 and later versions and AIR implement this technology (the process is called mipmapping), by creating optimized versions of varying scale of each bitmap (starting at 50%).

Flash Player and AIR create MIP maps for bitmaps (JPEG, GIF, or PNG files) that you display using the ActionScript 3.0 Loader class, or a BitmapData object; Flash Player creates MIP maps for the bitmaps that you display using the the ActionScript 2.0 loadMovie() function.

MIP maps are not applied to filtered objects or bitmap-cached movie clips. However, MIP maps are applied if you have bitmap transformations within a filtered display object, even if the bitmap is within masked content.

Flash Player and AIR mipmapping happens automatically, but you can follow a few guidelines to make sure your images take advantage of this optimization:

  • For video playback, set the smoothing property to true for the Video object (see the Video class).
  • For bitmaps, the smoothing property does not have to be set to true, but the quality improvements are more visible when bitmaps use smoothing.
  • Use bitmap sizes that are divisible by 4 or 8 for two-dimensional images (such as 640 x 128, which can be reduced as follows: 320 x 64 > 160 x 32 > 80 x 16 > 40 x 8 > 20 x 4 > 10 x 2 > 5 x 1) and 2^n for three-dimensional textures. MIP maps are generated from bitmaps that have a width and height that are 2^n (such as 256 x 256, 512 x 512, 1024 x 1024). Mipmapping stops when Flash Player or AIR encounters an odd width or height.