PCX: Minor clean up

This commit is contained in:
Harald Kuhr 2022-04-25 18:38:56 +02:00
parent ae138c3b4e
commit d87b80deea

View File

@ -213,14 +213,12 @@ public final class PCXImageReader extends ImageReaderBase {
byte[] rowDataByte = ((DataBufferByte) rowRaster.getDataBuffer()).getData();
for (int y = 0; y < height; y++) {
switch (header.getBitsPerPixel()) {
case 1:
readRowByte(input, srcRegion, xSub, ySub, planeData, 0, planeWidth * header.getChannels(), destRaster, clippedRow, y);
break;
default:
throw new AssertionError();
if (header.getBitsPerPixel() != 1) {
throw new AssertionError();
}
readRowByte(input, srcRegion, xSub, ySub, planeData, 0, planeWidth * header.getChannels(), destRaster, clippedRow, y);
int pixelPos = 0;
for (int planePos = 0; planePos < planeWidth; planePos++) {
BitRotator.bitRotateCW(planeData, planePos, planeWidth, rowDataByte, pixelPos, 1);