exifPiece = (JFIFPieceSegment) jfifPieces.exifPieces.get(0);
byte[] exifBytes = exifPiece.segmentData;
exifBytes = remainingBytes("trimmed exif bytes", exifBytes, 6);
writer = new TiffImageWriterLossless(outputSet.byteOrder, exifBytes);
} else {
writer = new TiffImageWriterLossy(outputSet.byteOrder);
}