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).
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.JimiRasterImage |
getChannelRectangle,
getColorModel,
getCroppedImageProducer,
getHeight,
getPixelRGB,
getProperties,
getRectangleARGBChannels,
getRectangleRGB,
getRectangleRGBAChannels,
getRectangleRGBChannels,
getRowRGB,
getWidth,
waitInfoAvailable |
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-coordinatey
- y-coordinatewidth
- rectangle width in pixels (multiple of 8)height
- rectangle heightpixels
- pre-packed pixel dataoffset
- offset in bytes to start reading from pixels atscansize
- 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-coordinatepixels
- pre-packed pixel dataoffset
- 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-coordinatey
- y-coordinatewidth
- rectangle width in pixels (multiple of 8)height
- rectangle heightbuffer
- buffer to copy intooffset
- offset in bytes to start copying into buffer atscansize
- 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 intooffset
- offset in bytes to start copying into buffer at- Throws:
- ImageAccessException - if an error prevents image from being accessed