InputStream is=new ByteArrayInputStream(data);
if(ifd.getFillOrder()!=LowColHighBit){is=new BitSwapInputStream(is);}
mbps=((max-offset)<mbps)?max-offset:mbps;
switch(cmp){
case NOCOMPRESSION: // 1
intis=new RGBInputStream(is,spp,alpha!=0);
break;
case LZW: // 5, non base line
is=new LZWInputStream(is,8,false);
intis=new RGBInputStream(is,spp,alpha!=0);
break;
case JPEG:
if(tables!=null){ intis=new JPEGInputStream(is,tables.getQTs(),tables.getDCIns(),tables.getACIns());
}else{ intis=new JPEGInputStream(is);}
break;
case PACKBITS: // 32773
is=new PackBitsInputStream(is);
intis=new RGBInputStream(is,spp,alpha!=0);
break;
default:
System.out.println("9\b"+cn+".readRGBImage:\n\tDo not support compression scheme "+cmp+".");
return image;
}