<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.Image
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.GridLayout.html#_top_">Previous</a>  <a href="java.awt.Insets.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.Image
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.awt.Image
</pre>
<hr>
<dl>
  <dt> public abstract class <b>Image</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
</dl>
The abstract class <code>Image</code> is the superclass of all 
 classes that represent graphical images. The image must be 
 obtained in a platform-specific manner.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SCALE_AREA_AVERAGING"><b>SCALE_AREA_AVERAGING</b></a>
  <dd>  Use the Area Averaging image scaling algorithm.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SCALE_DEFAULT"><b>SCALE_DEFAULT</b></a>
  <dd>  Use the default image-scaling algorithm.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SCALE_FAST"><b>SCALE_FAST</b></a>
  <dd>  Choose an image-scaling algorithm that gives higher priority
 to scaling speed than smoothness of the scaled image.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SCALE_REPLICATE"><b>SCALE_REPLICATE</b></a>
  <dd>  Use the image scaling algorithm embodied in the 
 <code>ReplicateScaleFilter</code> class.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SCALE_SMOOTH"><b>SCALE_SMOOTH</b></a>
  <dd>  Choose an image-scaling algorithm that gives higher priority
 to image smoothness than scaling speed.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#UndefinedProperty"><b>UndefinedProperty</b></a>
  <dd>  The <code>UndefinedProperty</code> object should be returned whenever a
 property which was not defined for a particular image is fetched.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Image()"><b>Image</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#flush()"><b>flush</b></a>()
  <dd>  Flushes all resources being used by this Image object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getGraphics()"><b>getGraphics</b></a>()
  <dd>  Creates a graphics context for drawing to an off-screen image.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getHeight(java.awt.image.ImageObserver)"><b>getHeight</b></a>(ImageObserver)
  <dd>  Determines the height of the image.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getProperty(java.lang.String, java.awt.image.ImageObserver)"><b>getProperty</b></a>(String, ImageObserver)
  <dd>  Gets a property of this image by name.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getScaledInstance(int, int, int)"><b>getScaledInstance</b></a>(int, int, int)
  <dd>  Creates a scaled version of this image.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getSource()"><b>getSource</b></a>()
  <dd>  Gets the object that produces the pixels for the image.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getWidth(java.awt.image.ImageObserver)"><b>getWidth</b></a>(ImageObserver)
  <dd>  Determines the width of the image.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="UndefinedProperty"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>UndefinedProperty</b>
<pre>
 public static final <a href="java.lang.Object.html#_top_">Object</a> UndefinedProperty
</pre>
<dl>
  <dd> The <code>UndefinedProperty</code> object should be returned whenever a
 property which was not defined for a particular image is fetched.<p>
</dl>
<a name="SCALE_DEFAULT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SCALE_DEFAULT</b>
<pre>
 public static final int SCALE_DEFAULT
</pre>
<dl>
  <dd> Use the default image-scaling algorithm.<p>
</dl>
<a name="SCALE_FAST"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SCALE_FAST</b>
<pre>
 public static final int SCALE_FAST
</pre>
<dl>
  <dd> Choose an image-scaling algorithm that gives higher priority
 to scaling speed than smoothness of the scaled image.<p>
</dl>
<a name="SCALE_SMOOTH"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SCALE_SMOOTH</b>
<pre>
 public static final int SCALE_SMOOTH
</pre>
<dl>
  <dd> Choose an image-scaling algorithm that gives higher priority
 to image smoothness than scaling speed.<p>
</dl>
<a name="SCALE_REPLICATE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SCALE_REPLICATE</b>
<pre>
 public static final int SCALE_REPLICATE
</pre>
<dl>
  <dd> Use the image scaling algorithm embodied in the 
 <code>ReplicateScaleFilter</code> class.  
 The <code>Image</code> object is free to substitute a different filter 
 that performs the same algorithm yet integrates more efficiently
 into the imaging infrastructure supplied by the toolkit.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ReplicateScaleFilter.html#_top_">ReplicateScaleFilter</a>
  </dl></dd>
</dl>
<a name="SCALE_AREA_AVERAGING"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SCALE_AREA_AVERAGING</b>
<pre>
 public static final int SCALE_AREA_AVERAGING
</pre>
<dl>
  <dd> Use the Area Averaging image scaling algorithm.  The
 image object is free to substitute a different filter that
 performs the same algorithm yet integrates more efficiently
 into the image infrastructure supplied by the toolkit.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.AreaAveragingScaleFilter.html#_top_">AreaAveragingScaleFilter</a>
  </dl></dd>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Image"></a>
<a name="Image()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Image</b>
<pre>
 public Image()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getWidth(java.awt.image.ImageObserver)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getWidth"><b>getWidth</b></a>
<pre>
 public abstract int getWidth(<a href="java.awt.image.ImageObserver.html#_top_">ImageObserver</a> observer)
</pre>
<dl>
  <dd> Determines the width of the image. If the width is not yet known, 
 this method returns <code>-1</code> and the specified   
 <code>ImageObserver</code> object is notified later.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> observer - an object waiting for the image to be loaded.
    <dt> <b>Returns:</b>
    <dd> the width of this image, or <code>-1</code>
                   if the width is not yet known.
    <dt> <b>See Also:</b>
    <dd> <a href="#getHeight">getHeight</a>, <a href="java.awt.image.ImageObserver.html#_top_">ImageObserver</a>
  </dl></dd>
</dl>
<a name="getHeight(java.awt.image.ImageObserver)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getHeight"><b>getHeight</b></a>
<pre>
 public abstract int getHeight(<a href="java.awt.image.ImageObserver.html#_top_">ImageObserver</a> observer)
</pre>
<dl>
  <dd> Determines the height of the image. If the height is not yet known, 
 this method returns <code>-1</code> and the specified  
 <code>ImageObserver</code> object is notified later.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> observer - an object waiting for the image to be loaded.
    <dt> <b>Returns:</b>
    <dd> the height of this image, or <code>-1</code>
                   if the height is not yet known.
    <dt> <b>See Also:</b>
    <dd> <a href="#getWidth">getWidth</a>, <a href="java.awt.image.ImageObserver.html#_top_">ImageObserver</a>
  </dl></dd>
</dl>
<a name="getSource()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getSource"><b>getSource</b></a>
<pre>
 public abstract <a href="java.awt.image.ImageProducer.html#_top_">ImageProducer</a> getSource()
</pre>
<dl>
  <dd> Gets the object that produces the pixels for the image.
 This method is called by the image filtering classes and by 
 methods that perform image conversion and scaling.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the image producer that produces the pixels
                                  for this image.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ImageProducer.html#_top_">ImageProducer</a>
  </dl></dd>
</dl>
<a name="getGraphics()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getGraphics"><b>getGraphics</b></a>
<pre>
 public abstract <a href="java.awt.Graphics.html#_top_">Graphics</a> getGraphics()
</pre>
<dl>
  <dd> Creates a graphics context for drawing to an off-screen image. 
 This method can only be called for off-screen images.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a graphics context to draw to the off-screen image.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Graphics.html#_top_">Graphics</a>, <a href="java.awt.Component.html#createImage(int, int)">createImage</a>
  </dl></dd>
</dl>
<a name="getProperty(java.lang.String, java.awt.image.ImageObserver)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getProperty"><b>getProperty</b></a>
<pre>
 public abstract <a href="java.lang.Object.html#_top_">Object</a> getProperty(<a href="java.lang.String.html#_top_">String</a> name,
                                    <a href="java.awt.image.ImageObserver.html#_top_">ImageObserver</a> observer)
</pre>
<dl>
  <dd> Gets a property of this image by name. 
 <p>
 Individual property names are defined by the various image 
 formats. If a property is not defined for a particular image, this 
 method returns the <code>UndefinedProperty</code> object. 
 <p>
 If the properties for this image are not yet known, this method 
 returns <code>null</code>, and the <code>ImageObserver</code> 
 object is notified later. 
 <p>
 The property name <code>"comment"</code> should be used to store 
 an optional comment which can be presented to the application as a 
 description of the image, its source, or its author.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> name - a property name.
    <dd> observer - an object waiting for this image to be loaded.
    <dt> <b>Returns:</b>
    <dd> the value of the named property.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ImageObserver.html#_top_">ImageObserver</a>, <a href="#UndefinedProperty">UndefinedProperty</a>
  </dl></dd>
</dl>
<a name="getScaledInstance(int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getScaledInstance"><b>getScaledInstance</b></a>
<pre>
 public <a href="#_top_">Image</a> getScaledInstance(int width,
                                int height,
                                int hints)
</pre>
<dl>
  <dd> Creates a scaled version of this image.
 A new <code>Image</code> object is returned which will render 
 the image at the specified <code>width</code> and 
 <code>height</code> by default.  The new <code>Image</code> object
 may be loaded asynchronously even if the original source image
 has already been loaded completely.  If either the <code>width</code> 
 or <code>height</code> is a negative number then a value is 
 substituted to maintain the aspect ratio of the original image 
 dimensions.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> width - the width to which to scale the image.
    <dd> height - the height to which to scale the image.
    <dd> hints - flags to indicate the type of algorithm to use
 for image resampling.
    <dt> <b>Returns:</b>
    <dd> a scaled version of the image.
    <dt> <b>See Also:</b>
    <dd> <a href="#SCALE_DEFAULT">SCALE_DEFAULT</a>, <a href="#SCALE_FAST">SCALE_FAST</a>, <a href="#SCALE_SMOOTH">SCALE_SMOOTH</a>, <a href="#SCALE_REPLICATE">SCALE_REPLICATE</a>, <a href="#SCALE_AVERAGE">SCALE_AVERAGE</a>
  </dl></dd>
</dl>
<a name="flush()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="flush"><b>flush</b></a>
<pre>
 public abstract void flush()
</pre>
<dl>
  <dd> Flushes all resources being used by this Image object.  This
 includes any pixel data that is being cached for rendering to
 the screen as well as any system resources that are being used
 to store data or pixels for the image.  The image is reset to
 a state similar to when it was first created so that if it is
 again rendered, the image data will have to be recreated or
 fetched again from its source.
<p>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.GridLayout.html#_top_">Previous</a>  <a href="java.awt.Insets.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
