public class TLcdTileDecoder extends ALcdTileDecoder implements ILcdTileDecoder
ILcdTileDecoder
decodes uncompressed tiles of bytes,
shorts, or integers.
Since the tiles don't have a header, their size and type have to be
specified explicitly to the decoder. The values are read in traditional
scanline order: row by row, left-to-right, top-to-bottom.
This decoder is a limited version of TLcdBILTileDecoder
.
This class is thread-safe.
Constructor and Description |
---|
TLcdTileDecoder(int aHeight,
int aWidth,
int aType)
Creates a new
TLcdTileDecoder for tiles with the given
specifications. |
Modifier and Type | Method and Description |
---|---|
protected ILcdTileInfo |
readTileFromStream(InputStream is,
int aImageIndex,
int aSubTileWidth,
int aSubTileHeight,
int aRowIndex,
int aColumnIndex,
ILcdBuffer aBuffer)
Reads a sub-tile from an input stream.
|
getInputStreamFactory, isTraceOn, readTile, readTile, setClassTraceOn, setInputStreamFactory, setTraceOn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readTile, readTile
public TLcdTileDecoder(int aHeight, int aWidth, int aType)
TLcdTileDecoder
for tiles with the given
specifications. Note that the width and height are not in the most
conventional order.aHeight
- the tile height.aWidth
- the tile width.aType
- the tile type: ILcdTile.BYTE
,
ILcdTile.SHORT
, or ILcdTile.INT
.protected ILcdTileInfo readTileFromStream(InputStream is, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException
ALcdTileDecoder
readTileFromStream
in class ALcdTileDecoder
is
- the input stream from which the tile data can be read.aImageIndex
- the index of the tile in the given input stream (if applicable).aSubTileWidth
- the width of the sub-tiles, expressed in pixels.aSubTileHeight
- the height of the sub-tiles, expressed in pixels.aRowIndex
- the row number of the sub-tile to be decoded.aColumnIndex
- the column number of the sub-tile to be decoded.aBuffer
- the buffer in which the decoded bytes will be stored.ILcdTileInfo
information about the decoded tile.TLcdCodecException
- in case of decoding problems.