Class TLcdEarthSeparateAlphaImageTileDataCodec
java.lang.Object
com.luciad.earth.repository.codec.TLcdEarthSeparateAlphaImageTileDataCodec
- All Implemented Interfaces:
ILcdEarthTileDataCodec
public class TLcdEarthSeparateAlphaImageTileDataCodec
extends Object
implements ILcdEarthTileDataCodec
Tile data codec for
BufferedImage objects. The images can be encoded to any format
supported by the ImageIO package. This format will only be used to encode the opaque image data.
The alpha channel is handled separately by this codec.
Typically the encoded format used with this codec either does not support an alpha channel or
does not provide sufficient quality for an alpha channel (ex. jpeg).- Since:
- 9.1
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs andTLcdEarthSeparateAlphaImageTileDataCodecusing the default format for the opaque image data (jpeg) and the default compression quality (0.9).Constructs andTLcdEarthSeparateAlphaImageTileDataCodecusing the specified format for the opaque image data and the default compression quality.TLcdEarthSeparateAlphaImageTileDataCodec(String aFormat, float aQuality) Constructs a newTLcdEarthSeparateAlphaImageTileDataCodecusing the specified format for the opaque image data and the specified compression quality. -
Method Summary
Modifier and TypeMethodDescriptiondecodeTileData(InputStream aSource) Decodes tile data from the given input stream.voidencodeTileData(Object aTileData, OutputStream aDestination) Encodes tile data to the given output stream.Returns the tile data format that this codec can encode or decode.Returns the format in which this codec encodes data.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.luciad.earth.repository.codec.ILcdEarthTileDataCodec
encodeTile
-
Constructor Details
-
TLcdEarthSeparateAlphaImageTileDataCodec
public TLcdEarthSeparateAlphaImageTileDataCodec()Constructs andTLcdEarthSeparateAlphaImageTileDataCodecusing the default format for the opaque image data (jpeg) and the default compression quality (0.9). -
TLcdEarthSeparateAlphaImageTileDataCodec
Constructs andTLcdEarthSeparateAlphaImageTileDataCodecusing the specified format for the opaque image data and the default compression quality.- Parameters:
aFormat- the format that will be used to encode/decode the opaque image data. This format must be supported by the ImageIO package.- See Also:
-
TLcdEarthSeparateAlphaImageTileDataCodec
Constructs a newTLcdEarthSeparateAlphaImageTileDataCodecusing the specified format for the opaque image data and the specified compression quality. Note that some ImageIO readers or writers may or may not support explicit compression settings.- Parameters:
aFormat- a format name that is supported by the ImageIO packageaQuality- a compression quality in[0,1]- See Also:
-
-
Method Details
-
decodeTileData
Description copied from interface:ILcdEarthTileDataCodecDecodes tile data from the given input stream. The return value of this method must be an object of the type returned byILcdEarthTileDataCodec.getDecodedTileFormat().- Specified by:
decodeTileDatain interfaceILcdEarthTileDataCodec- Parameters:
aSource- the input stream from which to read the tile data- Returns:
- the decoded tile data
- Throws:
IOException- if the tile data cannot be decoded
-
encodeTileData
Description copied from interface:ILcdEarthTileDataCodecEncodes tile data to the given output stream. TheaTileDataparameter must be an object of the type returned byILcdEarthTileDataCodec.getDecodedTileFormat().- Specified by:
encodeTileDatain interfaceILcdEarthTileDataCodec- Parameters:
aTileData- the tile data to be encodedaDestination- the output stream to which to encode the tile data- Throws:
IOException- if the tile data cannot be encoded
-
getDecodedTileFormat
Description copied from interface:ILcdEarthTileDataCodecReturns the tile data format that this codec can encode or decode. TheaTileparameter ofencodeTileData()should always be of this type, as should the return value ofdecodeTileData().- Specified by:
getDecodedTileFormatin interfaceILcdEarthTileDataCodec- Returns:
- the format of the tile data type that this codec can encode or decode
-
getEncodedDataFormat
Description copied from interface:ILcdEarthTileDataCodecReturns the format in which this codec encodes data. An example could be "JPEG" or "PNG" for image data. The format is used in conjunction withILcdEarthTileDataCodec.getDecodedTileFormat()to retrieve an appropriate tile data codec for any particular tile.- Specified by:
getEncodedDataFormatin interfaceILcdEarthTileDataCodec- Returns:
- a format in which this codec encodes data
-
toString
-