int maxTileX = XToTileX(dstRect.x + dstRect.width - 1,
0, tileWidth);
int maxTileY = YToTileY(dstRect.y + dstRect.height - 1,
0, tileLength);
TIFFCompressor encoder = new TIFFNullCompressor();
encoder.setWriter(this);
encoder.setStream(stream);
encoder.setMetadata(this.imageMetadata);
Rectangle tileRect = new Rectangle();
for(int ty = minTileY; ty <= maxTileY; ty++) {
for(int tx = minTileX; tx <= maxTileX; tx++) {
int tileIndex = ty*tilesAcross + tx;