Package com.luciad.format.raster
Class TLcdImageDecoder
java.lang.Object
com.luciad.format.raster.TLcdImageDecoder
- All Implemented Interfaces:
ILcdTileDecoder,ImageObserver
TLcdImageDecoder is an ILcdTileDecoder for images
supported by the platform's native implementation
of the Toolkit, i.e., Toolkit.getDefaultToolkit().
There is no guarantee to the type of images supported
by a given toolkit.
Therefore, using TLcdImageDecoder makes your application
platform specific to the extent that a format may be supported
by one toolkit implementation, but not by the other. This class is not thread safe. Create a new instance in every separate thread.
-
Field Summary
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanimageUpdate(Image img, int infoflags, int x, int y, int width, int height) The following flags are checked:WIDTHandHEIGHT.booleanDeprecated.This method has been deprecated.readTile(String aFileName, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) Reads a sub-tile from a file.readTile(URL aURL, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) Reads a sub-tile from a URL.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
TLcdImageDecoder
public TLcdImageDecoder()
-
-
Method Details
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istruethen all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
readTile
public ILcdTileInfo readTile(String aFileName, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException Description copied from interface:ILcdTileDecoderReads a sub-tile from a file.- Specified by:
readTilein interfaceILcdTileDecoder- Parameters:
aFileName- the name of the file containing the tile.aImageIndex- the index of the tile in the given file (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.- Returns:
ILcdTileInfoinformation about the decoded tile.- Throws:
TLcdCodecException- in case of decoding problems.
-
readTile
public ILcdTileInfo readTile(URL aURL, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException Description copied from interface:ILcdTileDecoderReads a sub-tile from a URL.- Specified by:
readTilein interfaceILcdTileDecoder- Parameters:
aURL- the URL containing the tile.aImageIndex- the index of the tile in the given URL (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.- Returns:
ILcdTileInfoinformation about the decoded tile.- Throws:
TLcdCodecException- in case of decoding problems.
-
imageUpdate
The following flags are checked:WIDTHandHEIGHT.- Specified by:
imageUpdatein interfaceImageObserver
-