/** * Read the pixel data for a non-interlaced image from the * data stream. * Update the imageData to reflect the new data. */ void readNonInterlacedImage(InputStream inputStream) throws IOException { int dataOffset = 0; int alignedBytesPerRow = getAlignedBytesPerRow(); int bytesPerRow = getBytesPerRow(); byte[] row1 = new byte[bytesPerRow]; byte[] row2 = new byte[bytesPerRow]; byte[] currentRow = row1; byte[] lastRow = row2; int height = headerChunk.getHeight(); for (int row = 0; row < height; row++) { byte filterType = (byte)inputStream.read(); int read = 0; while (read != bytesPerRow) { read += inputStream.read(currentRow, read, bytesPerRow - read); } filterRow(currentRow, lastRow, filterType); System.arraycopy(currentRow, 0, data, dataOffset, bytesPerRow); dataOffset += alignedBytesPerRow; currentRow = (currentRow == row1) ? row2 : row1; lastRow = (lastRow == row1) ? row2 : row1; } setImageDataValues(data, imageData); } /**
/** * Read the pixel data for a non-interlaced image from the * data stream. * Update the imageData to reflect the new data. */ void readNonInterlacedImage(InputStream inputStream) throws IOException { int dataOffset = 0; int alignedBytesPerRow = getAlignedBytesPerRow(); int bytesPerRow = getBytesPerRow(); byte[] row1 = new byte[bytesPerRow]; byte[] row2 = new byte[bytesPerRow]; byte[] currentRow = row1; byte[] lastRow = row2; int height = headerChunk.getHeight(); for (int row = 0; row < height; row++) { byte filterType = (byte)inputStream.read(); int read = 0; while (read != bytesPerRow) { read += inputStream.read(currentRow, read, bytesPerRow - read); } filterRow(currentRow, lastRow, filterType); System.arraycopy(currentRow, 0, data, dataOffset, bytesPerRow); dataOffset += alignedBytesPerRow; currentRow = (currentRow == row1) ? row2 : row1; lastRow = (lastRow == row1) ? row2 : row1; } setImageDataValues(data, imageData); } /**
/** * Read the pixel data for a non-interlaced image from the * data stream. * Update the imageData to reflect the new data. */ void readNonInterlacedImage(InputStream inputStream) throws IOException { int dataOffset = 0; int alignedBytesPerRow = getAlignedBytesPerRow(); int bytesPerRow = getBytesPerRow(); byte[] row1 = new byte[bytesPerRow]; byte[] row2 = new byte[bytesPerRow]; byte[] currentRow = row1; byte[] lastRow = row2; int height = headerChunk.getHeight(); for (int row = 0; row < height; row++) { byte filterType = (byte)inputStream.read(); int read = 0; while (read != bytesPerRow) { read += inputStream.read(currentRow, read, bytesPerRow - read); } filterRow(currentRow, lastRow, filterType); System.arraycopy(currentRow, 0, data, dataOffset, bytesPerRow); dataOffset += alignedBytesPerRow; currentRow = (currentRow == row1) ? row2 : row1; lastRow = (lastRow == row1) ? row2 : row1; } setImageDataValues(data, imageData); } /**
/** * Read the pixel data for a non-interlaced image from the * data stream. * Update the imageData to reflect the new data. */ void readNonInterlacedImage(InputStream inputStream) throws IOException { int dataOffset = 0; int alignedBytesPerRow = getAlignedBytesPerRow(); int bytesPerRow = getBytesPerRow(); byte[] row1 = new byte[bytesPerRow]; byte[] row2 = new byte[bytesPerRow]; byte[] currentRow = row1; byte[] lastRow = row2; int height = headerChunk.getHeight(); for (int row = 0; row < height; row++) { byte filterType = (byte)inputStream.read(); int read = 0; while (read != bytesPerRow) { read += inputStream.read(currentRow, read, bytesPerRow - read); } filterRow(currentRow, lastRow, filterType); System.arraycopy(currentRow, 0, data, dataOffset, bytesPerRow); dataOffset += alignedBytesPerRow; currentRow = (currentRow == row1) ? row2 : row1; lastRow = (lastRow == row1) ? row2 : row1; } setImageDataValues(data, imageData); } /**
/** * Read the pixel data for a non-interlaced image from the * data stream. * Update the imageData to reflect the new data. */ void readNonInterlacedImage(InputStream inputStream) throws IOException { int dataOffset = 0; int alignedBytesPerRow = getAlignedBytesPerRow(); int bytesPerRow = getBytesPerRow(); byte[] row1 = new byte[bytesPerRow]; byte[] row2 = new byte[bytesPerRow]; byte[] currentRow = row1; byte[] lastRow = row2; int height = headerChunk.getHeight(); for (int row = 0; row < height; row++) { byte filterType = (byte)inputStream.read(); int read = 0; while (read != bytesPerRow) { read += inputStream.read(currentRow, read, bytesPerRow - read); } filterRow(currentRow, lastRow, filterType); System.arraycopy(currentRow, 0, data, dataOffset, bytesPerRow); dataOffset += alignedBytesPerRow; currentRow = (currentRow == row1) ? row2 : row1; lastRow = (lastRow == row1) ? row2 : row1; } setImageDataValues(data, imageData); } /**
/** * Read the pixel data for a non-interlaced image from the * data stream. * Update the imageData to reflect the new data. */ void readNonInterlacedImage(InputStream inputStream) throws IOException { int dataOffset = 0; int alignedBytesPerRow = getAlignedBytesPerRow(); int bytesPerRow = getBytesPerRow(); byte[] row1 = new byte[bytesPerRow]; byte[] row2 = new byte[bytesPerRow]; byte[] currentRow = row1; byte[] lastRow = row2; int height = headerChunk.getHeight(); for (int row = 0; row < height; row++) { byte filterType = (byte)inputStream.read(); int read = 0; while (read != bytesPerRow) { read += inputStream.read(currentRow, read, bytesPerRow - read); } filterRow(currentRow, lastRow, filterType); System.arraycopy(currentRow, 0, data, dataOffset, bytesPerRow); dataOffset += alignedBytesPerRow; currentRow = (currentRow == row1) ? row2 : row1; lastRow = (lastRow == row1) ? row2 : row1; } setImageDataValues(data, imageData); } /**
lastRow = (lastRow == row1) ? row2 : row1; setImageDataValues(data, imageData); fireInterlacedFrameEvent(frameCount);
lastRow = (lastRow == row1) ? row2 : row1; setImageDataValues(data, imageData); fireInterlacedFrameEvent(frameCount);
lastRow = (lastRow == row1) ? row2 : row1; setImageDataValues(data, imageData); fireInterlacedFrameEvent(frameCount);
lastRow = (lastRow == row1) ? row2 : row1; setImageDataValues(data, imageData); fireInterlacedFrameEvent(frameCount);
lastRow = (lastRow == row1) ? row2 : row1; setImageDataValues(data, imageData); fireInterlacedFrameEvent(frameCount);
lastRow = (lastRow == row1) ? row2 : row1; setImageDataValues(data, imageData); fireInterlacedFrameEvent(frameCount);