O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

The AWT image package provides a number of different ways to manipulate images in addition to implementing filters. Images can be scaled on the fly by use of using the Graphics class, or a scaled representation of an image can may be obtained by invocation of invoking Image.getScaledInstance().

Pixels can may be grabbed from an image, and grabbed pixels can may be turned into an image. You can then implement image Image filters then can be implemented that never involve the image filtering classes at all—simply grab all the pixels you need, modify them, and use MemoryImageSource to convert them into another image.

Even animations can be implemented rather painlessly with the animation capabilities of the MemoryImageSource class.

Support ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required