Package loci.formats.tiff
Enum TiffCompression
- All Implemented Interfaces:
Serializable,Comparable<TiffCompression>,java.lang.constant.Constable,CodedEnum
Utility class for performing compression operations with a TIFF file.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compress(byte[] input, loci.formats.codec.CodecOptions options) Encodes a strip of data.byte[]decompress(byte[] input, loci.formats.codec.CodecOptions options) Decodes a strip of data.static voiddifference(byte[] input, IFD ifd) Performs in-place differencing according to the given predictor value.static TiffCompressionget(int code) Retrieves a TIFF compression instance by code.intgetCode()getCodec()Retrieves the name of the TIFF compression codec.Creates a set of codec options for compression.Creates a set of codec options for compression.static voidundifference(byte[] input, IFD ifd) Undoes in-place differencing according to the given predictor value.static TiffCompressionReturns the enum constant of this type with the specified name.static TiffCompression[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT_UNCOMPRESSED
-
UNCOMPRESSED
-
CCITT_1D
-
GROUP_3_FAX
-
GROUP_4_FAX
-
LZW
-
OLD_JPEG
-
JPEG
-
PACK_BITS
-
PROPRIETARY_DEFLATE
-
DEFLATE
-
THUNDERSCAN
-
JPEG_2000
-
JPEG_2000_LOSSY
-
ALT_JPEG2000
-
ALT_JPEG
-
OLYMPUS_JPEG2000
-
NIKON
-
JPEGXR
-
ZSTD
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
get
Retrieves a TIFF compression instance by code.- Parameters:
code- Integer "code" for the TIFF compression type.- Returns:
- See above.
-
getCode
public int getCode() -
getCodecName
Retrieves the name of the TIFF compression codec.- Returns:
- See above.
-
getCodec
- Returns:
- the codec instance for this TIFF compression.
-
decompress
public byte[] decompress(byte[] input, loci.formats.codec.CodecOptions options) throws loci.formats.FormatException, IOException Decodes a strip of data. -
undifference
Undoes in-place differencing according to the given predictor value.- Throws:
loci.formats.FormatException
-
getCompressionCodecOptions
public loci.formats.codec.CodecOptions getCompressionCodecOptions(IFD ifd) throws loci.formats.FormatException Creates a set of codec options for compression.- Parameters:
ifd- The IFD to create codec options for.- Returns:
- A new codec options instance populated using metadata from
ifd. - Throws:
loci.formats.FormatException
-
getCompressionCodecOptions
public loci.formats.codec.CodecOptions getCompressionCodecOptions(IFD ifd, loci.formats.codec.CodecOptions opt) throws loci.formats.FormatException Creates a set of codec options for compression.- Parameters:
ifd- The IFD to create codec options for.opt- The codec options to copy.- Returns:
- A new codec options instance populated using metadata from
ifd. - Throws:
loci.formats.FormatException
-
compress
public byte[] compress(byte[] input, loci.formats.codec.CodecOptions options) throws loci.formats.FormatException, IOException Encodes a strip of data. -
difference
Performs in-place differencing according to the given predictor value.- Throws:
loci.formats.FormatException
-