An Image Drawing Example
This example shows how to use the getWidth and getHeight methods of the Image class to use in scaling the image under java program control.
public void class Drawleaf extends java.applet.Applet
{ leafimg = getImage(getCodeBase( ),”images/Leaf.gif”);
public void paint ( Graphics g )
{ int w = leafimg.getWidth(this);
int h = leafimg.getHeight(this);
g.drawImage ( leafimg ,10, 10, w/4, h/4, this);