Create a PixelGrabber object to grab the (x, y, w, h) rectangular
section of pixels from the specified image.
Create a PixelGrabber object to grab the (x, y, w, h) rectangular
section of pixels from the specified image. The pixels are
accumulated in the original ColorModel if the same ColorModel
is used for every call to setPixels, otherwise the pixels are
accumulated in the default RGB ColorModel. If the forceRGB
parameter is true, then the pixels will be accumulated in the
default RGB ColorModel anyway. A buffer is allocated by the
PixelGrabber to hold the pixels in either case. If (w < 0) or
(h < 0), then they will default to the remaining width and
height of the source data when that information is delivered.
Parameters:
-
img - the image to retrieve the image data from
-
x - the x coordinate of the upper left corner of the rectangle
of pixels to retrieve from the image, relative to the default
(unscaled) size of the image
-
y - the y coordinate of the upper left corner of the rectangle
of pixels to retrieve from the image
-
w - the width of the rectangle of pixels to retrieve
-
h - the height of the rectangle of pixels to retrieve
-
forceRGB - true if the pixels should always be converted to
the default RGB ColorModel