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 BitRasterImage

All Known Implementing Classes:
  MemoryByteRasterImage, MemoryBitRasterImage, StampedBitRasterImage

public abstract interface BitRasterImage
extends ByteRasterImage

Interface for raster images with one-bit-per-pixel, allowing operations with 8 pixels packed into a single byte. All pixels have a value of either 0 or 1, and all packed pixels have the first pixel packed into the left-most (most significant) bit. All packed accesses are made in multipled of 8 pixels (1 byte).

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

Method Summary
`void` | `getRectanglePacked(int x, int y, int width, int height, byte[] buffer, int offset, int scansize)` Get a rectangle of pixels in their packed form.
`void` | `getRowPacked(int y, byte[] buffer, int offset)` Get a row of pixels in their packed form.
`void` | `setRectanglePacked(int x, int y, int width, int height, byte[] pixels, int offset, int scansize)` Set a rectangle of pre-packed data.
`void` | `setRowPacked(int y, byte[] pixels, int offset)` Set a row of pre-packed data.

Methods inherited from interface com.sun.jimi.core.raster.ByteRasterImage
`asByteArray, getPixel, getRectangle, getRow, setPixel, setRectangle, setRow`

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

### setRectanglePacked

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

  Set a rectangle of pre-packed data.
  Parameters:
    `x` - x-coordinate
    `y` - y-coordinate
    `width` - rectangle width in pixels (multiple of 8)
    `height` - rectangle height
    `pixels` - pre-packed pixel data
    `offset` - offset in bytes to start reading from pixels at
    `scansize` - number of bytes between the first pixel of one row to the next in pixels
  Throws:
    ImageAccessException - if an error prevents image from being accessed

### setRowPacked

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

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

### getRectanglePacked

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

  Get a rectangle of pixels in their packed form.
  Parameters:
    `x` - x-coordinate
    `y` - y-coordinate
    `width` - rectangle width in pixels (multiple of 8)
    `height` - rectangle height
    `buffer` - buffer to copy into
    `offset` - offset in bytes to start copying into buffer at
    `scansize` - number of bytes betwen the first pixel of one row to the next in pixels
  Throws:
    ImageAccessException - if an error prevents image from being accessed

### getRowPacked

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

  Get a row of pixels in their packed form.
  Parameters:
    `y` - y-coordinate
    `@param` - buffer buffer to copy into
    `offset` - offset in bytes to start copying into buffer at
  Throws:
    ImageAccessException - if an error prevents image from being accessed

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