| Package | Description | 
|---|---|
| java.awt | Contains all of the classes for creating user
interfaces and for painting graphics and images. | 
| java.awt.image | Provides classes for creating and modifying images. | 
| javax.imageio | The main package of the Java Image I/O API. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| Raster | PaintContext. getRaster(int x,
         int y,
         int w,
         int h)Returns a  Rastercontaining the colors generated for
 the graphics operation. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | CompositeContext. compose(Raster src,
       Raster dstIn,
       WritableRaster dstOut)Composes the two source  Rasterobjects and
 places the result in the destinationWritableRaster. | 
| Modifier and Type | Class | Description | 
|---|---|---|
| class  | WritableRasterThis class extends Raster to provide pixel writing capabilities. | 
| Modifier and Type | Field | Description | 
|---|---|---|
| protected Raster | Raster. parentThe parent of this Raster, or null. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| Raster | Raster. createChild(int parentX,
           int parentY,
           int width,
           int height,
           int childMinX,
           int childMinY,
           int[] bandList)Returns a new Raster which shares all or part of this Raster's
 DataBuffer. | |
| static Raster | Raster. createRaster(SampleModel sm,
            DataBuffer db,
            Point location)Creates a Raster with the specified SampleModel and DataBuffer. | |
| Raster | Raster. createTranslatedChild(int childMinX,
                     int childMinY)Create a Raster with the same size, SampleModel and DataBuffer
 as this one, but with a different location. | |
| Raster | RenderedImage. getData()Returns the image as one large tile (for tile based
 images this will require fetching the whole image
 and copying the image data over). | |
| Raster | BufferedImage. getData()Returns the image as one large tile. | |
| Raster | RenderedImage. getData(Rectangle rect)Computes and returns an arbitrary region of the RenderedImage. | |
| Raster | BufferedImage. getData(Rectangle rect)Computes and returns an arbitrary region of the
  BufferedImage. | |
| Raster | Raster. getParent()Returns the parent Raster (if any) of this Raster or null. | |
| Raster | RenderedImage. getTile(int tileX,
       int tileY)Returns tile (tileX, tileY). | |
| Raster | BufferedImage. getTile(int tileX,
       int tileY)Returns tile ( tileX,tileY). | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BufferedImage | IndexColorModel. convertToIntDiscrete(Raster raster,
                    boolean forceARGB)Returns a new  BufferedImageof TYPE_INT_ARGB or
 TYPE_INT_RGB that has aRasterwith pixel data
 computed by expanding the indices in the sourceRasterusing the color/alpha component arrays of thisColorModel. | |
| WritableRaster | BandCombineOp. createCompatibleDestRaster(Raster src)Creates a zeroed destination  Rasterwith the correct size
 and number of bands. | |
| WritableRaster | AffineTransformOp. createCompatibleDestRaster(Raster src)Creates a zeroed destination  Rasterwith the correct size
 and number of bands. | |
| WritableRaster | ColorConvertOp. createCompatibleDestRaster(Raster src)Creates a zeroed destination Raster with the correct size and number of
 bands, given this source. | |
| WritableRaster | LookupOp. createCompatibleDestRaster(Raster src)Creates a zeroed-destination  Rasterwith the
 correct size and number of bands, given this source. | |
| WritableRaster | RescaleOp. createCompatibleDestRaster(Raster src)Creates a zeroed-destination  Rasterwith the correct
 size and number of bands, given this source. | |
| WritableRaster | RasterOp. createCompatibleDestRaster(Raster src)Creates a zeroed destination Raster with the correct size and number of
 bands. | |
| WritableRaster | ConvolveOp. createCompatibleDestRaster(Raster src)Creates a zeroed destination Raster with the correct size and number
 of bands, given this source. | |
| WritableRaster | BandCombineOp. filter(Raster src,
      WritableRaster dst)Transforms the  Rasterusing the matrix specified in the
 constructor. | |
| WritableRaster | AffineTransformOp. filter(Raster src,
      WritableRaster dst)Transforms the source  Rasterand stores the results in
 the destinationRaster. | |
| WritableRaster | ColorConvertOp. filter(Raster src,
      WritableRaster dest)ColorConverts the image data in the source Raster. | |
| WritableRaster | LookupOp. filter(Raster src,
      WritableRaster dst)Performs a lookup operation on a  Raster. | |
| WritableRaster | RescaleOp. filter(Raster src,
      WritableRaster dst)Rescales the pixel data in the source Raster. | |
| WritableRaster | RasterOp. filter(Raster src,
      WritableRaster dest)Performs a single-input/single-output operation from a source Raster
 to a destination Raster. | |
| WritableRaster | ConvolveOp. filter(Raster src,
      WritableRaster dst)Performs a convolution on Rasters. | |
| Rectangle2D | BandCombineOp. getBounds2D(Raster src)Returns the bounding box of the transformed destination. | |
| Rectangle2D | AffineTransformOp. getBounds2D(Raster src)Returns the bounding box of the transformed destination. | |
| Rectangle2D | ColorConvertOp. getBounds2D(Raster src)Returns the bounding box of the destination, given this source. | |
| Rectangle2D | LookupOp. getBounds2D(Raster src)Returns the bounding box of the filtered destination Raster. | |
| Rectangle2D | RescaleOp. getBounds2D(Raster src)Returns the bounding box of the rescaled destination Raster. | |
| Rectangle2D | RasterOp. getBounds2D(Raster src)Returns the bounding box of the filtered destination Raster. | |
| Rectangle2D | ConvolveOp. getBounds2D(Raster src)Returns the bounding box of the filtered destination Raster. | |
| boolean | ComponentColorModel. isCompatibleRaster(Raster raster)Returns true if  rasteris compatible with thisColorModel; false if it is not. | |
| boolean | DirectColorModel. isCompatibleRaster(Raster raster)Returns  trueifrasteris compatible
 with thisColorModelandfalseif it is
 not. | |
| boolean | IndexColorModel. isCompatibleRaster(Raster raster)Returns  trueifrasteris compatible
 with thisColorModelorfalseif it
 is not compatible with thisColorModel. | |
| boolean | ColorModel. isCompatibleRaster(Raster raster)Returns  trueifrasteris compatible
 with thisColorModelandfalseif it is
 not. | |
| void | WritableRenderedImage. setData(Raster r)Sets a rect of the image to the contents of the Raster r, which is
 assumed to be in the same coordinate space as the WritableRenderedImage. | |
| void | BufferedImage. setData(Raster r)Sets a rectangular region of the image to the contents of the
 specified  Rasterr, which is
 assumed to be in the same coordinate space as theBufferedImage. | |
| void | WritableRaster. setDataElements(int x,
               int y,
               Raster inRaster)Sets the data for a rectangle of pixels from an input Raster. | |
| void | WritableRaster. setRect(int dx,
       int dy,
       Raster srcRaster)Copies pixels from Raster srcRaster to this WritableRaster. | |
| void | WritableRaster. setRect(Raster srcRaster)Copies pixels from Raster srcRaster to this WritableRaster. | 
| Constructor | Description | 
|---|---|
| Raster(SampleModel sampleModel,
      DataBuffer dataBuffer,
      Rectangle aRegion,
      Point sampleModelTranslate,
      Raster parent)Constructs a Raster with the given SampleModel, DataBuffer, and
 parent. | 
| Modifier and Type | Field | Description | 
|---|---|---|
| protected Raster | IIOImage. rasterThe  Rasterbeing referenced. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| Raster | IIOImage. getRaster()Returns the currently set  Raster, ornullif only aRenderedImageis
 available. | |
| Raster | ImageReader. readRaster(int imageIndex,
          ImageReadParam param)Returns a new  Rasterobject containing the raw pixel data
 from the image stream, without any color conversion applied. | |
| Raster | ImageReader. readTileRaster(int imageIndex,
              int tileX,
              int tileY)Returns a new  Rasterobject containing the raw
 pixel data from the tile, without any color conversion applied. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | ImageWriter. replacePixels(Raster raster,
             ImageWriteParam param)Replaces a portion of an image already present in the output
 with a portion of the given  Raster. | |
| void | IIOImage. setRaster(Raster raster)Sets the current  Raster. | 
| Constructor | Description | 
|---|---|
| IIOImage(Raster raster,
        List<? extends BufferedImage> thumbnails,
        IIOMetadata metadata)Constructs an  IIOImagecontaining aRaster, and thumbnails and metadata
 associated with it. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.