use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionDecompressTest method testLURAWAVE.
@Test(expectedExceptions = { FormatException.class })
public void testLURAWAVE() throws FormatException, IOException {
TiffCompression compression = TiffCompression.LURAWAVE;
assertNotNull(compression.decompress(DATA, OPTIONS));
}
use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionTest method testLookupUncompressed.
@Test
public void testLookupUncompressed() {
TiffCompression pi = TiffCompression.get(1);
assertEquals(TiffCompression.UNCOMPRESSED, pi);
}
use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionCompressTest method testTHUNDERSCAN.
@Test(expectedExceptions = { FormatException.class })
public void testTHUNDERSCAN() throws FormatException, IOException {
TiffCompression compression = TiffCompression.THUNDERSCAN;
CodecOptions options = compression.getCompressionCodecOptions(ifd);
compression.compress(data, options);
}
use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionCompressTest method testJPEG_2000_ResetQuality.
@Test(enabled = true)
public void testJPEG_2000_ResetQuality() throws FormatException, IOException {
TiffCompression compression = TiffCompression.JPEG_2000;
JPEG2000CodecOptions opt = JPEG2000CodecOptions.getDefaultOptions();
opt.quality = 1.0f;
CodecOptions options = compression.getCompressionCodecOptions(ifd, opt);
assertEquals(options.quality, opt.quality);
compression = TiffCompression.JPEG_2000_LOSSY;
options = compression.getCompressionCodecOptions(ifd, opt);
assertEquals(options.quality, opt.quality);
compression = TiffCompression.ALT_JPEG2000;
options = compression.getCompressionCodecOptions(ifd, opt);
assertEquals(options.quality, opt.quality);
}
use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.
the class TiffCompressionCompressTest method testJPEG_2000_LOSSY.
@Test
public void testJPEG_2000_LOSSY() throws FormatException, IOException {
TiffCompression compression = TiffCompression.JPEG_2000_LOSSY;
CodecOptions options = compression.getCompressionCodecOptions(ifd);
byte[] compressed = compression.compress(data, options);
assertNotNull(compressed);
}
Aggregations