diff --git a/web/scripts/pnginfo.js b/web/scripts/pnginfo.js index 2c03cf74a..f8d261fc6 100644 --- a/web/scripts/pnginfo.js +++ b/web/scripts/pnginfo.js @@ -49,7 +49,7 @@ export function getPngMetadata(file) { function parseExifData(exifData) { // Check for the correct TIFF header (0x4949 for little-endian or 0x4D4D for big-endian) - const isLittleEndian = new Uint16Array(exifData.slice(0, 2))[0] === 0x4949; + const isLittleEndian = String.fromCharCode(...exifData.slice(0, 2)) === "II"; // Function to read 16-bit and 32-bit integers from binary data function readInt(offset, isLittleEndian, length) {