BigTIFF write clean-up.
@@ -955,11 +955,15 @@ public final class TIFFImageWriter extends ImageWriterBase {
configureStreamByteOrder(streamMetadata, imageOutput);
writingSequence = true;
- sequenceTIFFWriter = new TIFFWriter("bigtiff".equalsIgnoreCase(getFormatName()) ? 8 : 4);
+ sequenceTIFFWriter = new TIFFWriter(isBigTIFF() ? 8 : 4);
sequenceTIFFWriter.writeTIFFHeader(imageOutput);
sequenceLastIFDPos = imageOutput.getStreamPosition();
}
+ private boolean isBigTIFF() throws IOException {
+ return "bigtiff".equalsIgnoreCase(getFormatName());
+ }
+
@Override
public void writeToSequence(final IIOImage image, final ImageWriteParam param) throws IOException {
if (!writingSequence) {
