(data: Uint8Array, width: number, height: number)
| 382 | } |
| 383 | |
| 384 | static bgra4444(data: Uint8Array, width: number, height: number): Uint8Array { |
| 385 | const rgba = new Uint8Array(4 * width * height); |
| 386 | let offset = 0; |
| 387 | |
| 388 | for (let i = 0; i < data.length; i += 2) { |
| 389 | const color = ImageDecoder.readUInt16LE(data, i); |
| 390 | const [a, r, g, b] = ImageDecoder.decode4444(color); |
| 391 | |
| 392 | rgba[offset++] = r; |
| 393 | rgba[offset++] = g; |
| 394 | rgba[offset++] = b; |
| 395 | rgba[offset++] = a; |
| 396 | } |
| 397 | |
| 398 | return rgba; |
| 399 | } |
| 400 | |
| 401 | static bgra555(data: Uint8Array, width: number, height: number): Uint8Array { |
| 402 | const rgba = new Uint8Array(4 * width * height); |
no test coverage detected