diff --git a/tools/palette-indexer.html b/tools/palette-indexer.html
index 4d8d901..9ae9726 100644
--- a/tools/palette-indexer.html
+++ b/tools/palette-indexer.html
@@ -661,7 +661,7 @@
const header = new Uint8Array([0x44, 0x50, 0x54, 0x01]); // 'DPT' + version 1
// Dimensions
- const widthBytes = new Uint8Array([ imageWidth ]);
+ const widthBytes = new Uint32Array([ imageWidth ]);
const heightBytes = new Uint32Array([ imageHeight ]);
// add indexed image data (imageWidth * imageHeight bytes)