Packagecom.adobe.portfolio.utils
Classpublic class ImageUtil
InheritanceImageUtil Inheritance Object

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The ImageUtil class implements a function that fits a Bitmap to specified dimensions.



Public Methods
 MethodDefined By
  
fitBitmap(bitmap:Bitmap, fitWidth:Number, fitHeight:Number, smoothing:Boolean = true):Bitmap
[static] Fits a Bitmap to specified dimensions.
ImageUtil
Method Detail
fitBitmap()method
public static function fitBitmap(bitmap:Bitmap, fitWidth:Number, fitHeight:Number, smoothing:Boolean = true):Bitmap

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Fits a Bitmap to specified dimensions.

Parameters

bitmap:Bitmap — The source bitmap
 
fitWidth:Number — The desired width
 
fitHeight:Number — The desired height
 
smoothing:Boolean (default = true) — An optional parameter to control smoothing of the new bitmap

Returns
Bitmap — The new bitmap which will have dimensions such that newWidth <= fitWidth and newHeight <= fitHeight, and either newWidth == fitWidth or newHeight == fitHeight