Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jimi.core.raster
Interface ByteRasterImage

All Known Subinterfaces:
  BitRasterImage

All Known Implementing Classes:
  MemoryByteRasterImage, StampedByteRasterImage

public abstract interface ByteRasterImage
extends MutableJimiRasterImage

Byte-based image representaion.

Fields inherited from class com.sun.jimi.core.raster.JimiRasterImage
`CHANNEL_ALPHA, CHANNEL_BLUE, CHANNEL_GREEN, CHANNEL_RED, UNKNOWN`

Method Summary
`byte[]` | `asByteArray()` Return a representation of the image in a byte array.
`byte` | `getPixel(int x, int y)` Get a pixel.
`void` | `getRectangle(int x, int y, int width, int height, byte[] buffer, int offset, int scansize)` Get a rectangular area of pixel data.
`void` | `getRow(int y, byte[] buffer, int offset)` Get a row of pixel data.
`void` | `setPixel(int x, int y, byte value)` Set a pixel.
`void` | `setRectangle(int x, int y, int width, int height, byte[] pixels, int offset, int scansize)` Set a rectangular area of pixel data.
`void` | `setRow(int y, byte[] pixels, int offset)` Set a row of pixel data.

Methods inherited from interface com.sun.jimi.core.raster.JimiRasterImage
`getChannelRectangle, getColorModel, getCroppedImageProducer, getHeight, getPixelRGB, getProperties, getRectangleARGBChannels, getRectangleRGB, getRectangleRGBAChannels, getRectangleRGBChannels, getRowRGB, getWidth, waitInfoAvailable`

Methods inherited from interface com.sun.jimi.core.MutableJimiImage
`mustWaitForOptions, setDecodingController, setError, setFinished, setImageConsumerHints, setOptions, setWaitForOptions`

Method Detail

### setRectangle

    public void setRectangle(int x,
                             int y,
                             int width,
                             int height,
                             byte[] pixels,
                             int offset,
                             int scansize)
                      throws ImageAccessException

  Set a rectangular area of pixel data.
  Parameters:
    `x` - x-coordinate
    `y` - y-coordinate
    `width` - rectangle width
    `height` - rectangle height
    `pixels` - pixel data
    `offset` - offset in pixels to start at
    `scansize` - length from the start of one row to the start of the next
  Throws:
    ImageAccessException - if an error prevents image from being accessed

### setRow

    public void setRow(int y,
                       byte[] pixels,
                       int offset)
                throws ImageAccessException

  Set a row of pixel data.
  Parameters:
    `y` - y-coordinate
    `pixels` - pixel data
    `offset` - offset in pixels to start at
  Throws:
    ImageAccessException - if an error prevents image from being accessed

### setPixel

    public void setPixel(int x,
                         int y,
                         byte value)
                  throws ImageAccessException

  Set a pixel.
  Parameters:
    `x` - x-coordinate
    `y` - y-coordinate
    `value` - pixel value
  Throws:
    ImageAccessException - if an error prevents image from being accessed

### getRectangle

    public void getRectangle(int x,
                             int y,
                             int width,
                             int height,
                             byte[] buffer,
                             int offset,
                             int scansize)
                      throws ImageAccessException

  Get a rectangular area of pixel data.
  Parameters:
    `x` - x-coordinate
    `y` - y-coordinate
    `width` - rectangle width
    `height` - rectangle height
    `buffer` - buffer to copy pixel data into
    `offset` - offset in buffer to start copying to
    `scansize` - length from the start of one row to the start of the next in buffer
  Throws:
    ImageAccessException - if an error prevents image from being accessed

### getRow

    public void getRow(int y,
                       byte[] buffer,
                       int offset)
                throws ImageAccessException

  Get a row of pixel data.
  Parameters:
    `y` - y-coordinate
    `buffer` - buffer to copy pixel data into
    `offset` - offset in buffer to start copying to
  Throws:
    ImageAccessException - if an error prevents image from being accessed

### getPixel

    public byte getPixel(int x,
                         int y)
                  throws ImageAccessException

  Get a pixel.
  Parameters:
    `x` - x-coordinate
    `y` - y-coordinate
  Returns:
    the value of the pixel at (x, y)
  Throws:
    ImageAccessException - if an error prevents image from being accessed

### asByteArray

    public byte[] asByteArray()

  Return a representation of the image in a byte array. Pixels should be ordered TDLR, with a scansize equal to the image width.
  Returns:
    an array of image pixels, or null if not appropriate (e.g., VMM and too large to fit in memory)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD