Package loci.formats.codec
Class JPEGXRCodec
java.lang.Object
loci.formats.codec.BaseCodec
loci.formats.codec.JPEGXRCodec
- All Implemented Interfaces:
Codec
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compress(byte[] data, CodecOptions options) Compresses a block of data.byte[]decompress(byte[] buf, CodecOptions options) The CodecOptions parameter should have the following fields set:maxBytesinterleavedbitsPerSamplelittleEndianwidthheightbyte[]decompress(loci.common.RandomAccessInputStream in, CodecOptions options) Decompresses data from the given RandomAccessInputStream.private voidInitializes the JPEG-XR dependency service.Methods inherited from class loci.formats.codec.BaseCodec
compress, decompress, decompress, decompress, test
-
Field Details
-
service
-
-
Constructor Details
-
JPEGXRCodec
public JPEGXRCodec()
-
-
Method Details
-
compress
Description copied from interface:CodecCompresses a block of data.- Parameters:
data- The data to be compressed.options- Options to be used during compression, if appropriate.- Returns:
- The compressed data.
- Throws:
FormatException- If input is not a compressed data block of the appropriate type.
-
decompress
public byte[] decompress(loci.common.RandomAccessInputStream in, CodecOptions options) throws FormatException, IOException Description copied from interface:CodecDecompresses data from the given RandomAccessInputStream.- Specified by:
decompressin interfaceCodec- Specified by:
decompressin classBaseCodec- Parameters:
in- The stream from which to read compressed data.options- Options to be used during decompression.- Returns:
- The decompressed data.
- Throws:
FormatException- If data is not valid compressed data for this decompressor.IOException
-
decompress
The CodecOptions parameter should have the following fields set:maxBytesinterleavedbitsPerSamplelittleEndianwidthheight- Specified by:
decompressin interfaceCodec- Overrides:
decompressin classBaseCodec- Parameters:
buf- the data to be decompressedoptions- Options to be used during decompression.- Returns:
- the decompressed data.
- Throws:
FormatException- If data is not valid.- See Also:
-
initialize
Initializes the JPEG-XR dependency service. This is called at the beginning of thedecompress(loci.common.RandomAccessInputStream, loci.formats.codec.CodecOptions)method to avoid having the constructor's method definition contain a checked exception.- Throws:
FormatException- If there is an error initializing JPEG-XR services.
-