I noticed a couple bugs in the code from John Zukowski's tip in JavaWorld and just thought I'd spruce it up a bit. While doing this I think I stumbled across a bug in drawImage also.

Original Java Tip

You need a Java-enabled browser to view this applet. Here is the original source code.

A More Efficient Implementation?

You need a Java-enabled browser to view this applet. Here is the modified source code.
(This uses Graphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) to scale from a 1x200 image to a 180x180 image)

An Bug in the API?

You need a Java-enabled browser to view this applet.
(This uses Graphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) to scale from a 1x200 image to a 200x200 image)

The image above is monochrome for me. I've only tried this with Netscape 3.0 and Netscape 2.02 on HP-UX A.09.07. I haven't tried the appletviewer or any other platform yet. Your mileage may vary.
It appears from my tests, that if the scale factor == 1.0 for either the width or height of the image, then an index is not being incremented somewhere???
I haven't checked the newsgroups or known bugs on this one yet. Please e-mail me at abb@nuccard.eushc.org if you have any comment.