(data: Uint8Array, width: number, height: number)
| 365 | } |
| 366 | |
| 367 | static bgra1555(data: Uint8Array, width: number, height: number): Uint8Array { |
| 368 | const rbga = new Uint8Array(4 * width * height); |
| 369 | let offset = 0; |
| 370 | |
| 371 | for (let i = 0; i < data.length; i += 2) { |
| 372 | const color = ImageDecoder.readUInt16LE(data, i); |
| 373 | const [a, r, g, b] = ImageDecoder.decode1555(color); |
| 374 | |
| 375 | rbga[offset++] = r; |
| 376 | rbga[offset++] = g; |
| 377 | rbga[offset++] = b; |
| 378 | rbga[offset++] = a; |
| 379 | } |
| 380 | |
| 381 | return rbga; |
| 382 | } |
| 383 | |
| 384 | static bgra4444(data: Uint8Array, width: number, height: number): Uint8Array { |
| 385 | const rgba = new Uint8Array(4 * width * height); |
no test coverage detected