java.awt.image
public class BufferedImage extends Image implements WritableRenderedImage, Transparency
| Field Summary | |
|---|---|
| static int | TYPE_3BYTE_BGR |
| static int | TYPE_4BYTE_ABGR |
| static int | TYPE_4BYTE_ABGR_PRE |
| static int | TYPE_BYTE_BINARY |
| static int | TYPE_BYTE_GRAY |
| static int | TYPE_BYTE_INDEXED |
| static int | TYPE_CUSTOM |
| static int | TYPE_INT_ARGB |
| static int | TYPE_INT_ARGB_PRE |
| static int | TYPE_INT_BGR |
| static int | TYPE_INT_RGB |
| static int | TYPE_USHORT_555_RGB |
| static int | TYPE_USHORT_565_RGB |
| static int | TYPE_USHORT_GRAY |
| Constructor Summary | |
|---|---|
| BufferedImage(int width, int height, int type)
Creates a new BufferedImage with the specified width, height
and type. | |
| BufferedImage(int w, int h, int type, IndexColorModel indexcolormodel) | |
| BufferedImage(ColorModel colormodel, WritableRaster writableraster, boolean premultiplied, Hashtable<?,?> properties) | |
| Method Summary | |
|---|---|
| void | addTileObserver(TileObserver to)
Adds a tile observer. |
| void | coerceData(boolean premultiplied) |
| WritableRaster | copyData(WritableRaster dest) |
| Graphics2D | createGraphics() |
| void | flush() |
| WritableRaster | getAlphaRaster() |
| ColorModel | getColorModel() |
| Raster | getData() |
| Raster | getData(Rectangle rectangle) |
| Graphics | getGraphics() |
| int | getHeight() |
| int | getHeight(ImageObserver imageobserver) |
| int | getMinTileX() |
| int | getMinTileY() |
| int | getMinX() |
| int | getMinY() |
| int | getNumXTiles() |
| int | getNumYTiles() |
| Object | getProperty(String string)
Returns the value of the specified property, or
{@link Image#UndefinedProperty} if the property is not defined.
|
| Object | getProperty(String string, ImageObserver imageobserver) |
| String[] | getPropertyNames()
Returns null always.
|
| WritableRaster | getRaster() |
| int | getRGB(int x, int y) |
| int[] | getRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scanlineStride) |
| SampleModel | getSampleModel() |
| ImageProducer | getSource() |
| Vector<RenderedImage> | getSources() |
| BufferedImage | getSubimage(int x, int y, int w, int h) |
| Raster | getTile(int tileX, int tileY) |
| int | getTileGridXOffset() |
| int | getTileGridYOffset() |
| int | getTileHeight() |
| int | getTileWidth() |
| int | getTransparency()
Return the transparency type.
|
| int | getType() |
| int | getWidth() |
| int | getWidth(ImageObserver imageobserver) |
| WritableRaster | getWritableTile(int tileX, int tileY) |
| Point[] | getWritableTileIndices() |
| boolean | hasTileWriters() |
| boolean | isAlphaPremultiplied() |
| boolean | isTileWritable(int tileX, int tileY) |
| void | releaseWritableTile(int tileX, int tileY) |
| void | removeTileObserver(TileObserver to)
Removes a tile observer. |
| void | setData(Raster src) |
| void | setRGB(int x, int y, int argb) |
| void | setRGB(int startX, int startY, int w, int h, int[] argbArray, int offset, int scanlineStride) |
| String | toString() |
BufferedImage with the specified width, height
and type. Valid type values are:
Parameters: width the width (must be > 0). height the height (must be > 0). type the image type (see the list of valid types above).
Throws: IllegalArgumentException if width or
height is less than or equal to zero. IllegalArgumentException if type is not one of the
specified values.
Parameters: to The TileObserver to add.
Parameters: string the property key (null not permitted).
Returns: The property value.
Throws: NullPointerException if string is null.
null always.
Returns: null always.
Returns: One of {@link #OPAQUE}, {@link #BITMASK}, or {@link #TRANSLUCENT}.
Since: 1.5
See Also: getTransparency
Parameters: to The TileObserver to remove.