All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.image.ByteLookupTable

java.lang.Object
    |
    +----java.awt.image.LookupTable
            |
            +----java.awt.image.ByteLookupTable

public class ByteLookupTable
extends LookupTable
This class defines a lookup table object. The lookup table contains byte data for one or more tile channels or image components (for example, separate arrays for R, G, and B), and it contains an offset which will be subtracted from the input value before indexing the array. This allows an array smaller than the native data size to be constructed for a constrained input. If there is only one array in the lookup table, it will be applied to all channels.

See Also:
ShortLookupTable, LookupOp

Constructor Index

 o ByteLookupTable(int, byte[])
Create a LookupTable object from an array of bytes representing a lookup table for each tile channel.
 o ByteLookupTable(int, byte[][])
Create a LookupTable object from an array of byte arrays representing a lookup table for each tile channel.

Method Index

 o getDataStorage()
Returns the lookup table data.
 o lookupPixel(byte[], byte[])
Returns an array of components of a pixel, translated with the lookup table.
 o lookupPixel(int[], int[])
Returns an array of components of a pixel, translated with the lookup table.

Constructors

 o ByteLookupTable
public ByteLookupTable(int offset,
                       byte[][] data)
Create a LookupTable object from an array of byte arrays representing a lookup table for each tile channel. The offset will be subtracted from the input value before indexing into the arrays. The number of components is the length of the data argument. The data array for each component stored as a reference.

 o ByteLookupTable
public ByteLookupTable(int offset,
                       byte[] data)
Create a LookupTable object from an array of bytes representing a lookup table for each tile channel. The offset will be subtracted from the input value before indexing into the array. The number of components is one. The data array will be stored internally.

Methods

 o getDataStorage
public byte[][] getDataStorage()
Returns the lookup table data.

Returns:
LookupTable data array.
 o lookupPixel
public int[] lookupPixel(int[] src,
                         int[] dst)
Returns an array of components of a pixel, translated with the lookup table. The source and destination can be equal. If dst is null, a new array will be allocated. The dst array is returned.

Returns:
an int array of components.
Overrides:
lookupPixel in class LookupTable
 o lookupPixel
public byte[] lookupPixel(byte[] src,
                          byte[] dst)
Returns an array of components of a pixel, translated with the lookup table. The source and destination can be equal. If dst is null, a new array will be allocated. The dst array is returned.

Returns:
a byte array of components.

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature