MCPcopy
hub / github.com/pythongosssss/ComfyUI-Custom-Scripts / #readEndianness

Method #readEndianness

web/js/workflowImage.js:305–316  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303 }
304
305 #readEndianness() {
306 const II = 0x4949;
307 const MM = 0x4d4d;
308 const endianness = this.#reader.read(2);
309 if (endianness === II) {
310 this.#reader.littleEndian = true;
311 } else if (endianness === MM) {
312 this.#reader.littleEndian = false;
313 } else {
314 throw new Error("Invalid JPEG: Endianness marker not found.");
315 }
316 }
317}
318
319class Jpeg {

Callers 1

readExifMethod · 0.95

Calls 1

readMethod · 0.80

Tested by

no test coverage detected