use of loci.formats.utests.tiff.TiffWriterMock in project bioformats by openmicroscopy.
the class TiffWriterTest method testSetBigTiffAutomatic.
@Test
public void testSetBigTiffAutomatic() throws IOException, FormatException {
// Test that no exception is thrown when bigTiff is set automatically due to size
metadata.setPixelsSizeT(new PositiveInteger(1000), 0);
writer.setMetadataRetrieve(metadata);
((TiffWriterMock) writer).createOutputBuffer(true);
long length = 4294967296L;
((TiffWriterMock) writer).setBufferLength(length);
writer.setId("test.tiff");
writer.saveBytes(0, buf, ifd);
}
use of loci.formats.utests.tiff.TiffWriterMock in project bioformats by openmicroscopy.
the class TiffWriterTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
ifd = new IFD();
writer = new TiffWriterMock();
metadata = WriterUtilities.createMetadata();
for (int i = 0; i < 1024 * 1024; i++) {
buf[i] = (byte) (i % 255);
}
}
Aggregations