Please review at your convenience. Issue: https://bugs.openjdk.java.net/browse/JDK-8154075 Patch: http://cr.openjdk.java.net/~bpb/8154075/webrev.00/
For banded images make sure the step in the horizontal differencing predictor calculations for Deflate and LZW compression is unity (1) instead of the number of samples per pixel. This change was verified with the two images attached to the issue along with six 8 bits-per-sample images compressed using the horizontal differencing predictor and having the following characteristics: 1 - grayscale, single image plane, Deflate compression (created using tiffcp) 2 - grayscale, single image plane, LZW compression (created using tiffcp) 3 - RGB, separate image planes, Deflate compression (attached to issue) 4 - RGB, separate image planes, LZW compression (attached to issue) 5 - RGB, single image plane, Deflate compression (created using tiffcp) 6 - RGB, single image plane, LZW compression (created using tiffcp) Thanks, Brian