September 1998
Intermediate to advanced
970 pages
18h 42m
English
As we've seen, the AWT provides extensive support for filtering images. However, sometimes it is convenient to be able access the pixel data of an image without having to bother with implementing an image filter in order to access this data. do so. That is precisely the role of the PixelGrabber class. PixelGrabber is an implementation of the ImageConsumer interface that grabs a rectangular region of pixels within a given image.
PixelGrabber provides three constructors that take the following arguments:
(Image im, int x, int y, int w, int h, boolean forceRGB
(Image im, int x, int y, int w, int h, int[] buffer,
int offset, int scansize)
(ImageProducer ip, int x, int y, int w, int h, int[] buffer,
int offset, int scansize)
All ...
Read now
Unlock full access