| 197 | } |
| 198 | |
| 199 | void getPalette() throws IOException { |
| 200 | noOfEntries = actualColorsUsed; |
| 201 | if (noOfEntries>0) { |
| 202 | r = new byte[noOfEntries]; |
| 203 | g = new byte[noOfEntries]; |
| 204 | b = new byte[noOfEntries]; |
| 205 | |
| 206 | int reserved; |
| 207 | for (int i = 0; i < noOfEntries; i++) { |
| 208 | b[i] = (byte)is.read(); |
| 209 | g[i] = (byte)is.read(); |
| 210 | r[i] = (byte)is.read(); |
| 211 | reserved = is.read(); |
| 212 | curPos += 4; |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | void unpack(byte[] rawData, int rawOffset, int bpp, byte[] byteData, int byteOffset, int w) throws Exception { |
| 218 | int j = byteOffset; |