Java java.awt.image BufferedImage fields, constructors, methods, implement or subclass

Example usage for Java java.awt.image BufferedImage fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt.image BufferedImage.

The text is from its open source code.

Subclass

java.awt.image.BufferedImage has subclasses.
Click this link to see all its subclasses.

Field

intTYPE_CUSTOM
Image type is not recognized so it must be a customized image.
intTYPE_INT_RGB
Represents an image with 8-bit RGB color components packed into integer pixels.
intTYPE_INT_ARGB
Represents an image with 8-bit RGBA color components packed into integer pixels.
intTYPE_INT_ARGB_PRE
Represents an image with 8-bit RGBA color components packed into integer pixels.
intTYPE_INT_BGR
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.
intTYPE_3BYTE_BGR
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.
intTYPE_4BYTE_ABGR
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.
intTYPE_4BYTE_ABGR_PRE
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.
intTYPE_USHORT_565_RGB
Represents an image with 5-6-5 RGB color components (5-bits red, 6-bits green, 5-bits blue) with no alpha.
intTYPE_USHORT_555_RGB
Represents an image with 5-5-5 RGB color components (5-bits red, 5-bits green, 5-bits blue) with no alpha.
intTYPE_BYTE_GRAY
Represents a unsigned byte grayscale image, non-indexed.
intTYPE_USHORT_GRAY
Represents an unsigned short grayscale image, non-indexed).
intTYPE_BYTE_BINARY
Represents an opaque byte-packed 1, 2, or 4 bit image.
intTYPE_BYTE_INDEXED
Represents an indexed byte image.

Constructor

BufferedImage(int width, int height, int imageType)
Constructs a BufferedImage of one of the predefined image types.
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.
BufferedImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable properties)
Constructs a new BufferedImage with a specified ColorModel and Raster .

Method

WritableRastercopyData(WritableRaster outRaster)
Computes an arbitrary rectangular region of the BufferedImage and copies it into a specified WritableRaster .
Graphics2DcreateGraphics()
Creates a Graphics2D , which can be used to draw into this BufferedImage .
voidflush()
Flushes all reconstructable resources being used by this Image object.
WritableRastergetAlphaRaster()
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 .
ColorModelgetColorModel()
Returns the ColorModel .
RastergetData()
Returns the image as one large tile.
java.awt.GraphicsgetGraphics()
This method returns a Graphics2D , but is here for backwards compatibility.
intgetHeight()
Returns the height of the BufferedImage .
intgetHeight(ImageObserver observer)
Returns the height of the BufferedImage .
intgetMinX()
Returns the minimum x coordinate of this BufferedImage .
intgetMinY()
Returns the minimum y coordinate of this BufferedImage .
ObjectgetProperty(String name)
Returns a property of the image by name.
String[]getPropertyNames()
Returns an array of names recognized by #getProperty(String) getProperty(String) or null , if no property names are recognized.
WritableRastergetRaster()
Returns the WritableRaster .
intgetRGB(int x, int y)
Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace.
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.
SampleModelgetSampleModel()
Returns the SampleModel associated with this BufferedImage .
ImagegetScaledInstance(int width, int height, int hints)
Creates a scaled version of this image.
ImageProducergetSource()
Returns the object that produces the pixels for the image.
BufferedImagegetSubimage(int x, int y, int w, int h)
Returns a subimage defined by a specified rectangular region.
intgetTileWidth()
Returns the tile width in pixels.
intgetTransparency()
Returns the transparency.
intgetType()
Returns the image type.
intgetWidth()
Returns the width of the BufferedImage .
intgetWidth(ImageObserver observer)
Returns the width of the BufferedImage .
WritableRastergetWritableTile(int tileX, int tileY)
Checks out a tile for writing.
inthashCode()
Returns a hash code value for the object.
booleanisAlphaPremultiplied()
Returns whether or not the alpha has been premultiplied.
voidreleaseWritableTile(int tileX, int tileY)
Relinquishes permission to write to a tile.
voidsetData(Raster r)
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 .
voidsetRGB(int x, int y, int rgb)
Sets a pixel in this BufferedImage to the specified RGB value.
voidsetRGB(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.
StringtoString()
Returns a String representation of this BufferedImage object and its values.