com.sun.jimi.core.raster
Interface ChanneledIntRasterImage
- All Known Implementing Classes:
- MemoryIntRasterImage, StampedIntRasterImage
- public abstract interface ChanneledIntRasterImage
- extends IntRasterImage
Extension of IntRasterImage to support setting individual channels, in the same way
IntRasterImage allows getting them.
Method Summary |
void |
setChannelPixel(int channel,
int x,
int y,
byte value)
Set a channel of data for a pixel. |
void |
setChannelRectangle(int channel,
int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
Set a rectangular area of pixel data for a single byte channel of the image. |
void |
setChannelRow(int channel,
int y,
byte[] pixels,
int offset)
|
Methods inherited from interface com.sun.jimi.core.raster.JimiRasterImage |
getColorModel,
getCroppedImageProducer,
getHeight,
getPixelRGB,
getProperties,
getRectangleARGBChannels,
getRectangleRGB,
getRectangleRGBAChannels,
getRectangleRGBChannels,
getRowRGB,
getWidth,
waitInfoAvailable |
setChannelRectangle
public void setChannelRectangle(int channel,
int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
throws ImageAccessException
- Set a rectangular area of pixel data for a single byte channel of the image.
Channels use the standard AARRGGBB mask, where ALPHA/RED/GREEN/BLUE represent
the position of the data though the actual ARGB interpretation if handled by
the ColorModel. The channel of data thus may not represent the color
component suggested by the channel label.
- Parameters:
channel
- the channel to set, either CHANNEL_ALPHA, CHANNEL_RED, CHANNEL_GREEN, or
CHANNEL_BLUEx
- x-coordinatey
- y-coordinatewidth
- rectangle widthheight
- rectangle heightpixels
- pixel dataoffset
- offset in pixels to start reading fromscansize
- length from the start of one row to the start of the next in pixels- Throws:
- ImageAccessException - if an error prevents image from being accessed
setChannelRow
public void setChannelRow(int channel,
int y,
byte[] pixels,
int offset)
throws ImageAccessException
setChannelPixel
public void setChannelPixel(int channel,
int x,
int y,
byte value)
throws ImageAccessException
- Set a channel of data for a pixel.
- Parameters:
channel
- the channel to set, either CHANNEL_ALPHA, CHANNEL_RED, CHANNEL_GREEN, or
CHANNEL_BLUEx
- x-coordinatey
- y-coordinatevalue
- channel value- Throws:
- ImageAccessException - if an error prevents image from being accessed