6386906: Faulty rounding code in BMPImageReader.decodeRLE4()

Reviewed-by: flar, psadhukhan
This commit is contained in:
Jayathirth D V 2016-06-15 14:22:44 +05:30 committed by Jayathirth D V
parent a222aedf0f
commit 964b5e2fe5

View File

@ -1655,7 +1655,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
// Whenever end pixels can fit into odd number of bytes,
// an extra padding byte will be present, so skip that.
if ((((int)Math.ceil(end/2)) & 1) ==1 ) {
if ((((end + 1) / 2) & 1) == 1) {
count++;
}
break;