This commit is contained in:
2026-02-15 01:09:28 -06:00
parent af9904c892
commit 92a753560b
9 changed files with 110 additions and 124 deletions

View File

@@ -663,17 +663,17 @@
// Width
const widthBytes = new Uint8Array(4);
widthBytes[0] = (imageWidth >> 24) & 0xFF;
widthBytes[1] = (imageWidth >> 16) & 0xFF;
widthBytes[2] = (imageWidth >> 8) & 0xFF;
widthBytes[3] = imageWidth & 0xFF;
widthBytes[3] = (imageWidth >> 24) & 0xFF;
widthBytes[2] = (imageWidth >> 16) & 0xFF;
widthBytes[1] = (imageWidth >> 8) & 0xFF;
widthBytes[0] = imageWidth & 0xFF;
// Height
const heightBytes = new Uint8Array(4);
heightBytes[0] = (imageHeight >> 24) & 0xFF;
heightBytes[1] = (imageHeight >> 16) & 0xFF;
heightBytes[2] = (imageHeight >> 8) & 0xFF;
heightBytes[3] = imageHeight & 0xFF;
heightBytes[3] = (imageHeight >> 24) & 0xFF;
heightBytes[2] = (imageHeight >> 16) & 0xFF;
heightBytes[1] = (imageHeight >> 8) & 0xFF;
heightBytes[0] = imageHeight & 0xFF;
// add indexed image data (imageWidth * imageHeight bytes)
const imageData = new Uint8Array(indexedImage.length);