mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 15:57:06 +08:00
Fix for isLittleEndian flag in parseExifData.
This commit is contained in:
parent
011b11d8d7
commit
4d3db79efa
@ -49,7 +49,7 @@ export function getPngMetadata(file) {
|
|||||||
|
|
||||||
function parseExifData(exifData) {
|
function parseExifData(exifData) {
|
||||||
// Check for the correct TIFF header (0x4949 for little-endian or 0x4D4D for big-endian)
|
// 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 to read 16-bit and 32-bit integers from binary data
|
||||||
function readInt(offset, isLittleEndian, length) {
|
function readInt(offset, isLittleEndian, length) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user