(InStream is, PIXEL_T type)
| 102 | private static enum PIXEL_T { U8, U16, U24A, U24B, U32 }; |
| 103 | |
| 104 | private static ByteBuffer READ_PIXEL(InStream is, PIXEL_T type) { |
| 105 | switch (type) { |
| 106 | case U8: |
| 107 | return ByteBuffer.allocate(1).put(0, (byte)is.readOpaque8()); |
| 108 | case U16: |
| 109 | return ByteBuffer.allocate(2).putShort(0, (short)is.readOpaque16()); |
| 110 | case U24A: |
| 111 | return readOpaque24A(is); |
| 112 | case U24B: |
| 113 | return readOpaque24B(is); |
| 114 | default: |
| 115 | return ByteBuffer.allocate(4).putInt(0, is.readOpaque32()); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | private void zrleDecode8(Rect r, InStream is, |
| 120 | ZlibInStream zis, |
no test coverage detected