// array from the image being written so make a copy.
System.arraycopy(b, off, rowBuf, 0, bytesPerRow);
for(int j = bytesPerRow - 1; j >= samplesPerPixel; j--) {
rowBuf[j] -= rowBuf[j - samplesPerPixel];
}
lzwCompressor.compress(rowBuf, 0, bytesPerRow);
} else {
lzwCompressor.compress(b, off, bytesPerRow);
}
off += scanlineStride;
}