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

How Image Producers and Image Consumers Interact

Somehow, one or more image consumers are registered with a single image producer. Typically, this happens behind the scenes—unless you are filtering images or grabbing pixels, you rarely deal with image consumers directly.

At some point in time, the image producer invokes the image consumer's setDimensions(). Optionally, producers may invoke setHints() and setColorModel() to further inform consumers as to the properties of the image it is about to deliver.

Once production of the image starts, producers invoke one of the consumer's overloaded setPixels(). setPixels() may be called once, therefore delivering the entire image in one shot, or it may be called multiple times with regions of the image ...

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