ImageProducer
| Modifier and Type | Field and Description |
|---|---|
| public static final int | COMPLETESCANLINES
The pixels will be delivered in (multiples of) complete scanlines at a time. |
| public static final int | IMAGEABORTED
The image creation process was deliberately aborted. |
| public static final int | IMAGEERROR
An error was encountered while producing the image. |
| public static final int | RANDOMPIXELORDER
The pixels will be delivered in a random order. |
| public static final int | SINGLEFRAME
The image contain a single static image. |
| public static final int | SINGLEFRAMEDONE
One frame of the image is complete but there are more frames to be delivered. |
| public static final int | SINGLEPASS
The pixels will be delivered in a single pass. |
| public static final int | STATICIMAGEDONE
The image is complete and there are no more pixels or frames to be delivered. |
| public static final int | TOPDOWNLEFTRIGHT
The pixels will be delivered in top-down, left-to-right order. |
| Modifier and Type | Method and Description |
|---|---|
| public void | imageComplete(int
the status of image loading status)The imageComplete method is called when the ImageProducer is finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occurred. |
| public void | setColorModel(ColorModel
the specified model)ColorModelSets the ColorModel object used for the majority of the pixels reported using the setPixels method calls. |
| public void | setDimensions(int
the width of the source image width, int the height of the source image height)The dimensions of the source image are reported using the setDimensions method call. |
| public void | setHints(int
a set of hints that the ImageConsumer uses to
process the pixels hintflags)Sets the hints that the ImageConsumer uses to process the pixels delivered by the ImageProducer. |
| public void | setPixels(int
the X coordinate of the upper-left corner of the
area of pixels to be set x, int the Y coordinate of the upper-left corner of the
area of pixels to be set y, int the width of the area of pixels w, int the height of the area of pixels h, ColorModel the specified model, byte[] ColorModelthe array of pixels pixels, int the offset into the off, int pixels arraythe distance from one row of pixels to the next in
the scansize)pixels arrayDelivers the pixels of the image with one or more calls to this method. |
| public void | setPixels(int
the X coordinate of the upper-left corner of the
area of pixels to be set x, int the Y coordinate of the upper-left corner of the
area of pixels to be set y, int the width of the area of pixels w, int the height of the area of pixels h, ColorModel the specified model, int[] ColorModelthe array of pixels pixels, int the offset into the off, int pixels arraythe distance from one row of pixels to the next in
the scansize)pixels arrayThe pixels of the image are delivered using one or more calls to the setPixels method. |
| public void | setProperties(Hashtable<?, ?>
the list of properties to be associated with this
image props)Sets the extensible list of properties associated with this image. |
| COMPLETESCANLINES | back to summary |
|---|---|
| public static final int COMPLETESCANLINES The pixels will be delivered in (multiples of) complete scanlines at a time.
| |
| IMAGEABORTED | back to summary |
|---|---|
| public static final int IMAGEABORTED The image creation process was deliberately aborted.
| |
| IMAGEERROR | back to summary |
|---|---|
| public static final int IMAGEERROR An error was encountered while producing the image.
| |
| RANDOMPIXELORDER | back to summary |
|---|---|
| public static final int RANDOMPIXELORDER The pixels will be delivered in a random order. This tells the ImageConsumer not to use any optimizations that depend on the order of pixel delivery, which should be the default assumption in the absence of any call to the setHints method.
| |
| SINGLEFRAME | back to summary |
|---|---|
| public static final int SINGLEFRAME The image contain a single static image. The pixels will be defined in calls to the setPixels methods and then the imageComplete method will be called with the STATICIMAGEDONE flag after which no more image data will be delivered. An example of an image type which would not meet these criteria would be the output of a video feed, or the representation of a 3D rendering being manipulated by the user. The end of each frame in those types of images will be indicated by calling imageComplete with the SINGLEFRAMEDONE flag.
| |
| SINGLEFRAMEDONE | back to summary |
|---|---|
| public static final int SINGLEFRAMEDONE One frame of the image is complete but there are more frames to be delivered.
| |
| SINGLEPASS | back to summary |
|---|---|
| public static final int SINGLEPASS The pixels will be delivered in a single pass. Each pixel will appear in only one call to any of the setPixels methods. An example of an image format which does not meet this criterion is a progressive JPEG image which defines pixels in multiple passes, each more refined than the previous.
| |
| STATICIMAGEDONE | back to summary |
|---|---|
| public static final int STATICIMAGEDONE The image is complete and there are no more pixels or frames to be delivered.
| |
| TOPDOWNLEFTRIGHT | back to summary |
|---|---|
| public static final int TOPDOWNLEFTRIGHT The pixels will be delivered in top-down, left-to-right order.
| |
| imageComplete | back to summary |
|---|---|
| public void imageComplete(int status) The imageComplete method is called when the ImageProducer is finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occurred. The ImageConsumer should remove itself from the list of consumers registered with the ImageProducer at this time, unless it is interested in successive frames.
| |
| setColorModel | back to summary |
|---|---|
| public void setColorModel(ColorModel model) Sets the ColorModel object used for the majority of the pixels reported using the setPixels method calls. Note that each set of pixels delivered using setPixels contains its own ColorModel object, so no assumption should be made that this model will be the only one used in delivering pixel values. A notable case where multiple ColorModel objects may be seen is a filtered image when for each set of pixels that it filters, the filter determines whether the pixels can be sent on untouched, using the original ColorModel, or whether the pixels should be modified (filtered) and passed on using a ColorModel more convenient for the filtering process.
| |
| setDimensions | back to summary |
|---|---|
| public void setDimensions(int width, int height) The dimensions of the source image are reported using the setDimensions method call.
| |
| setHints | back to summary |
|---|---|
| public void setHints(int hintflags) Sets the hints that the ImageConsumer uses to process the pixels delivered by the ImageProducer. The ImageProducer can deliver the pixels in any order, but the ImageConsumer may be able to scale or convert the pixels to the destination ColorModel more efficiently or with higher quality if it knows some information about how the pixels will be delivered up front. The setHints method should be called before any calls to any of the setPixels methods with a bit mask of hints about the manner in which the pixels will be delivered. If the ImageProducer does not follow the guidelines for the indicated hint, the results are undefined.
| |
| setPixels | back to summary |
|---|---|
| public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Delivers the pixels of the image with one or more calls to this method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified ColorModel object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * scansize + m + off). The pixels delivered using this method are all stored as bytes.
| |
| setPixels | back to summary |
|---|---|
| public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) The pixels of the image are delivered using one or more calls to the setPixels method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified ColorModel object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * scansize + m + off). The pixels delivered using this method are all stored as ints. this method are all stored as ints.
| |
| setProperties | back to summary |
|---|---|
| public void setProperties(Hashtable<?, ?> props) Sets the extensible list of properties associated with this image.
| |