|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.image.LookupTable
java.awt.image.ByteLookupTable
public class ByteLookupTable
ByteLookupTable represents translation arrays for pixel values. It wraps one or more data arrays for each layer (or component) in an image, such as Alpha, R, G, and B. When doing translation, the offset is subtracted from the pixel values to allow a subset of an array to be used.
Constructor Summary | |
---|---|
ByteLookupTable(int offset,
byte[] data)
Creates a new ByteLookupTable instance. |
|
ByteLookupTable(int offset,
byte[][] data)
Creates a new ByteLookupTable instance. |
Method Summary | |
---|---|
byte[][] |
getTable()
Return the lookup tables. |
byte[] |
lookupPixel(byte[] src,
byte[] dst)
Return translated values for a pixel. |
int[] |
lookupPixel(int[] src,
int[] dst)
Return translated values for a pixel. |
Methods inherited from class java.awt.image.LookupTable |
---|
getNumComponents, getOffset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteLookupTable(int offset, byte[][] data) throws IllegalArgumentException
ByteLookupTable
instance.
Offset is subtracted from pixel values when looking up in the translation
tables. If data.length is one, the same table is applied to all pixel
components.
offset
- Offset to be subtracted.data
- Array of lookup tables (null
not permitted).
IllegalArgumentException
- if offset < 0 or data.length < 1.public ByteLookupTable(int offset, byte[] data) throws IllegalArgumentException
ByteLookupTable
instance.
Offset is subtracted from pixel values when looking up in the translation
table. The same table is applied to all pixel components.
offset
- Offset to be subtracted.data
- Lookup table for all components (null
not
permitted).
IllegalArgumentException
- if offset < 0.Method Detail |
---|
public final byte[][] getTable()
public int[] lookupPixel(int[] src, int[] dst) throws ArrayIndexOutOfBoundsException
lookupPixel
in class LookupTable
src
- Component values of a pixel.dst
- Destination array for values, or null.
ArrayIndexOutOfBoundsException
public byte[] lookupPixel(byte[] src, byte[] dst) throws ArrayIndexOutOfBoundsException
src
- Component values of a pixel.dst
- Destination array for values, or null.
ArrayIndexOutOfBoundsException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |