use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionCompressTest method testLURAWAVE.
@Test(expectedExceptions = { FormatException.class })
public void testLURAWAVE() throws FormatException, IOException {
TiffCompression compression = TiffCompression.LURAWAVE;
CodecOptions options = compression.getCompressionCodecOptions(ifd);
compression.compress(data, options);
}
use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionCompressTest method testGROUP_3_FAX.
@Test(expectedExceptions = { FormatException.class })
public void testGROUP_3_FAX() throws FormatException, IOException {
TiffCompression compression = TiffCompression.GROUP_3_FAX;
CodecOptions options = compression.getCompressionCodecOptions(ifd);
compression.compress(data, options);
}
use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionCompressTest method testPACK_BITS.
@Test(expectedExceptions = { FormatException.class })
public void testPACK_BITS() throws FormatException, IOException {
TiffCompression compression = TiffCompression.PACK_BITS;
CodecOptions options = compression.getCompressionCodecOptions(ifd);
compression.compress(data, options);
}
use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionCompressTest method testCCITT_1D.
@Test(expectedExceptions = { FormatException.class })
public void testCCITT_1D() throws FormatException, IOException {
TiffCompression compression = TiffCompression.CCITT_1D;
CodecOptions options = compression.getCompressionCodecOptions(ifd);
compression.compress(data, options);
}
use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffWriter method formatCompression.
/**
* Sets the compression code for the specified IFD.
*
* @param ifd The IFD table to handle.
*/
private void formatCompression(IFD ifd) throws FormatException {
if (compression == null)
compression = "";
TiffCompression compressType = TiffCompression.UNCOMPRESSED;
if (compression.equals(COMPRESSION_LZW)) {
compressType = TiffCompression.LZW;
} else if (compression.equals(COMPRESSION_J2K)) {
compressType = TiffCompression.JPEG_2000;
} else if (compression.equals(COMPRESSION_J2K_LOSSY)) {
compressType = TiffCompression.JPEG_2000_LOSSY;
} else if (compression.equals(COMPRESSION_JPEG)) {
compressType = TiffCompression.JPEG;
}
Object v = ifd.get(new Integer(IFD.COMPRESSION));
if (v == null)
ifd.put(new Integer(IFD.COMPRESSION), compressType.getCode());
}
Aggregations