Image.getScaledInstance

Image.getScaledInstance

Class Overview | Class Members | This Package | All Packages

Syntax
public Image getScaledInstance( int width, int height, int hints )
Parameters
width
the width to which to scale the image.
height
the height to which to scale the image.
hints
flags to indicate the type of algorithm to use for image resampling.
Returns
a scaled version of the image.
Description
Creates a scaled version of this image. A new Image object is returned which will render the image at the specified width and height by default. The new Image object may be loaded asynchronously even if the original source image has already been loaded completely. If either the width or height is a negative number then a value is substituted to maintain the aspect ratio of the original image dimensions.

See Also
SCALE_DEFAULT, SCALE_FAST, SCALE_SMOOTH, SCALE_REPLICATE, SCALE_AREA_AVERAGING