API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.image. BufferedImage View Source
Author(s)
Since
Version
10 Feb 1997
Serial
Hierarchy
 Object
      Image
          BufferedImage
Implements
 WritableRenderedImage
 Transparency
Subclasses
Description
public class BufferedImage
  The BufferedImage subclass describes an Image with an accessible buffer of image data.
Constructors
public BufferedImage (ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable<Object, Object> properties)
  Constructs a new BufferedImage with a specified ColorModel and Raster.
public BufferedImage (int width, int height, int imageType)
  Constructs a BufferedImage of one of the predefined image types.
public BufferedImage (int width, int height, int imageType, IndexColorModel cm)
  Constructs a BufferedImage of one of the predefined image types: TYPE_BYTE_BINARY or TYPE_BYTE_INDEXED.
Methods
Hide/Show inherited methods
public void addTileObserver (TileObserver to) [Specified in WritableRenderedImage]
  Adds a tile observer.
public void coerceData (boolean isAlphaPremultiplied)
  Forces the data to match the state specified in the isAlphaPremultiplied variable.
public WritableRaster copyData (WritableRaster outRaster)
  Computes an arbitrary rectangular region of the BufferedImage and copies it into a specified WritableRaster.
public Graphics2D createGraphics ()
  Creates a Graphics2D, which can be used to draw into this BufferedImage.
public void flush () [Inherited From Image]
  Flushes all reconstructable resources being used by this Image object.
public float getAccelerationPriority () [Inherited From Image]
  Returns the current value of the acceleration priority hint.
public WritableRaster getAlphaRaster ()
  Returns a WritableRaster representing the alpha channel for BufferedImage objects with ColorModel objects that support a separate spatial alpha channel, such as ComponentColorModel and DirectColorModel.
public ImageCapabilities getCapabilities (GraphicsConfiguration gc) [Inherited From Image]
  Returns an ImageCapabilities object which can be inquired as to the capabilities of this Image on the specified GraphicsConfiguration.
public ColorModel getColorModel ()
  Returns the ColorModel.
public Raster getData ()
  Returns the image as one large tile.
public Raster getData (Rectangle rect)
  Computes and returns an arbitrary region of the BufferedImage.
public Graphics getGraphics () [Specified in Image]
  This method returns a Graphics2D, but is here for backwards compatibility.
public int getHeight ()
  Returns the height of the BufferedImage.
public int getHeight (ImageObserver observer) [Specified in Image]
  Returns the height of the BufferedImage.
public int getMinTileX ()
  Returns the minimum tile index in the x direction.
public int getMinTileY ()
  Returns the minimum tile index in the y direction.
public int getMinX ()
  Returns the minimum x coordinate of this BufferedImage.
public int getMinY ()
  Returns the minimum y coordinate of this BufferedImage.
public int getNumXTiles ()
  Returns the number of tiles in the x direction.
public int getNumYTiles ()
  Returns the number of tiles in the y direction.
public Object getProperty (String name)
  Returns a property of the image by name.
public Object getProperty (String name, ImageObserver observer) [Specified in Image]
  Returns a property of the image by name.
public String getPropertyNames ()
  Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
public WritableRaster getRaster ()
  Returns the WritableRaster.
public int getRGB (int x, int y)
  Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace.
public int getRGB (int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
  Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, from a portion of the image data.
public SampleModel getSampleModel ()
  Returns the SampleModel associated with this BufferedImage.
public Image getScaledInstance (int width, int height, int hints) [Inherited From Image]
  Creates a scaled version of this image.
public ImageProducer getSource () [Specified in Image]
  Returns the object that produces the pixels for the image.
public Vector<RenderedImage> getSources ()
  Returns a Vector of RenderedImage objects that are the immediate sources, not the sources of these immediate sources, of image data for this BufferedImage.
public BufferedImage getSubimage (int x, int y, int w, int h)
  Returns a subimage defined by a specified rectangular region.
public Raster getTile (int tileX, int tileY)
  Returns tile (tileXtileY).
public int getTileGridXOffset ()
  Returns the x offset of the tile grid relative to the origin, For example, the x coordinate of the location of tile (0, 0).
public int getTileGridYOffset ()
  Returns the y offset of the tile grid relative to the origin, For example, the y coordinate of the location of tile (0, 0).
public int getTileHeight ()
  Returns the tile height in pixels.
public int getTileWidth ()
  Returns the tile width in pixels.
public int getTransparency () [Specified in Transparency]
  Returns the transparency.
public int getType ()
  Returns the image type.
public int getWidth ()
  Returns the width of the BufferedImage.
public int getWidth (ImageObserver observer) [Specified in Image]
  Returns the width of the BufferedImage.
public WritableRaster getWritableTile (int tileX, int tileY) [Specified in WritableRenderedImage]
  Checks out a tile for writing.
public Point getWritableTileIndices () [Specified in WritableRenderedImage]
  Returns an array of Point objects indicating which tiles are checked out for writing.
public boolean hasTileWriters () [Specified in WritableRenderedImage]
  Returns whether or not any tile is checked out for writing.
public boolean isAlphaPremultiplied ()
  Returns whether or not the alpha has been premultiplied.
public boolean isTileWritable (int tileX, int tileY) [Specified in WritableRenderedImage]
  Returns whether or not a tile is currently checked out for writing.
public void releaseWritableTile (int tileX, int tileY) [Specified in WritableRenderedImage]
  Relinquishes permission to write to a tile.
public void removeTileObserver (TileObserver to) [Specified in WritableRenderedImage]
  Removes a tile observer.
public void setAccelerationPriority (float priority) [Inherited From Image]
  Sets a hint for this image about how important acceleration is.
public void setData (Raster r) [Specified in WritableRenderedImage]
  Sets a rectangular region of the image to the contents of the specified Raster r, which is assumed to be in the same coordinate space as the BufferedImage.
publicsynchronized void setRGB (int x, int y, int rgb)
  Sets a pixel in this BufferedImage to the specified RGB value.
public void setRGB (int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
  Sets an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, into a portion of the image data.
public String toString ()
  Returns a String representation of this BufferedImage object and its values.
Fields
Hide/Show inherited fields
protected float accelerationPriority [Inherited From Image]
  Priority for accelerating this image.
publicfinalstatic int BITMASK = "2" [Inherited From Transparency]
Represents image data that is guaranteed to be either completely opaque, with an alpha value of 1.0, or completely transparent, with an alpha value of 0.0.
pack-private ColorModel colorModel
pack-private int imageType
pack-private boolean isAlphaPremultiplied
publicfinalstatic int OPAQUE = "1" [Inherited From Transparency]
Represents image data that is guaranteed to be completely opaque, meaning that all pixels have an alpha value of 1.0.
pack-private sun.awt.image.OffScreenImageSource osis
pack-private Hashtable properties
pack-private WritableRaster raster
publicfinalstatic int SCALE_AREA_AVERAGING = "16" [Inherited From Image]
  Use the Area Averaging image scaling algorithm.
publicfinalstatic int SCALE_DEFAULT = "1" [Inherited From Image]
  Use the default image-scaling algorithm.
publicfinalstatic int SCALE_FAST = "2" [Inherited From Image]
  Choose an image-scaling algorithm that gives higher priority to scaling speed than smoothness of the scaled image.
publicfinalstatic int SCALE_REPLICATE = "8" [Inherited From Image]
  Use the image scaling algorithm embodied in the ReplicateScaleFilter class.
publicfinalstatic int SCALE_SMOOTH = "4" [Inherited From Image]
  Choose an image-scaling algorithm that gives higher priority to image smoothness than scaling speed.
publicfinalstatic int TRANSLUCENT = "3" [Inherited From Transparency]
Represents image data that contains or might contain arbitrary alpha values between and including 0.0 and 1.0.
publicfinalstatic int TYPE_3BYTE_BGR = "5"
  Represents an image with 8-bit RGB color components, corresponding to a Windows-style BGR color model) with the colors Blue, Green, and Red stored in 3 bytes.
publicfinalstatic int TYPE_4BYTE_ABGR = "6"
  Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha.
publicfinalstatic int TYPE_4BYTE_ABGR_PRE = "7"
  Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha.
publicfinalstatic int TYPE_BYTE_BINARY = "12"
  Represents an opaque byte-packed 1, 2, or 4 bit image.
publicfinalstatic int TYPE_BYTE_GRAY = "10"
  Represents a unsigned byte grayscale image, non-indexed.
publicfinalstatic int TYPE_BYTE_INDEXED = "13"
  Represents an indexed byte image.
publicfinalstatic int TYPE_CUSTOM = "0"
  Image type is not recognized so it must be a customized image.
publicfinalstatic int TYPE_INT_ARGB = "2"
  Represents an image with 8-bit RGBA color components packed into integer pixels.
publicfinalstatic int TYPE_INT_ARGB_PRE = "3"
  Represents an image with 8-bit RGBA color components packed into integer pixels.
publicfinalstatic int TYPE_INT_BGR = "4"
  Represents an image with 8-bit RGB color components, corresponding to a Windows- or Solaris- style BGR color model, with the colors Blue, Green, and Red packed into integer pixels.
publicfinalstatic int TYPE_INT_RGB = "1"
  Represents an image with 8-bit RGB color components packed into integer pixels.
publicfinalstatic int TYPE_USHORT_555_RGB = "9"
  Represents an image with 5-5-5 RGB color components (5-bits red, 5-bits green, 5-bits blue) with no alpha.
publicfinalstatic int TYPE_USHORT_565_RGB = "8"
  Represents an image with 5-6-5 RGB color components (5-bits red, 6-bits green, 5-bits blue) with no alpha.
publicfinalstatic int TYPE_USHORT_GRAY = "11"
  Represents an unsigned short grayscale image, non-indexed).
publicfinalstatic Object UndefinedProperty [Inherited From Image]
The UndefinedProperty object should be returned whenever a property which was not defined for a particular image is fetched.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar