final int index = channel * height + y;
final byte[] packed = BinaryFunctions.readBytes("scanline",
is, scanlineBytecounts[index],
"PSD: Missing Image Data");
final byte[] unpacked = new PackBits().decompress(packed, width);
final InputStream bais = new ByteArrayInputStream(unpacked);
final MyBitInputStream mbis = new MyBitInputStream(bais, ByteOrder.BIG_ENDIAN);
BitsToByteInputStream bbis = null;
boolean canThrow = false;
try {