ret = (ret << 8) | ((int) in[offset + 1] & 0xff); ret = (ret << 8) | ((int) in[offset + 0] & 0xff); return (ret); } int npalette[] = new int[nNumColors]; byte bpalette[] = new byte[nNumColors * 4]; fs.read(bpalette, 0, nNumColors * 4); int nindex8 = 0; for (int n = 0; n < nNumColors; n++) { npalette[n] = constructInt3(bpalette, nindex8); nindex8 += 4; } // Read the image data (actually indices into the palette) // Scan lines are still padded out to even 4-byte // boundaries. int npad8 = (bh.nsizeimage / bh.nheight) - bh.nwidth; // System.out.println("nPad is:"+npad8); int ndata8[] = new int[bh.nwidth * bh.nheight]; byte bdata[] = new byte[(bh.nwidth + npad8) * bh.nheight];
ret = (ret << 8) | ((int) in[offset + 1] & 0xff); ret = (ret << 8) | ((int) in[offset + 0] & 0xff); return (ret); }
int npalette[] = new int[nNumColors]; byte bpalette[] = new byte[nNumColors * 4]; fs.read(bpalette, 0, nNumColors * 4); int nindex8 = 0; for (int n = 0; n < nNumColors; n++) { npalette[n] = constructInt3(bpalette, nindex8); nindex8 += 4; } // Read the image data (actually indices into the palette) // Scan lines are still padded out to even 4-byte // boundaries. int npad8 = (bh.nsizeimage / bh.nheight) - bh.nwidth; // System.out.println("nPad is:"+npad8); int ndata8[] = new int[bh.nwidth * bh.nheight]; byte bdata[] = new byte[(bh.nwidth + npad8) * bh.nheight];