musistudio/claude-code-router · error
Unsupported PNG format.
Error message
Unsupported PNG format.
What it means
Error "Unsupported PNG format." thrown in musistudio/claude-code-router.
Source
Thrown at packages/electron/src/main/ipc.ts:778
offset += 4;
const data = png.subarray(offset, offset + length);
offset += length + 4;
if (type === "IHDR") {
width = data.readUInt32BE(0);
height = data.readUInt32BE(4);
bitDepth = data[8];
colorType = data[9];
interlaceMethod = data[12];
} else if (type === "IDAT") {
idatChunks.push(Buffer.from(data));
} else if (type === "IEND") {
break;
}
}
if (width <= 0 || height <= 0 || bitDepth !== 8 || (colorType !== 2 && colorType !== 6) || interlaceMethod !== 0) {
throw new Error("Unsupported PNG format.");
}
const channels = colorType === 6 ? 4 : 3;
const stride = width * channels;
const inflated = inflateSync(Buffer.concat(idatChunks));
const pixels = new Uint8Array(width * height * channels);
let sourceOffset = 0;
let previousRow = new Uint8Array(stride);
for (let y = 0; y < height; y += 1) {
const filter = inflated[sourceOffset];
sourceOffset += 1;
const row = new Uint8Array(stride);
for (let x = 0; x < stride; x += 1) {
const raw = inflated[sourceOffset + x];
const left = x >= channels ? row[x - channels] : 0;
const up = previousRow[x] ?? 0;
const upLeft = x >= channels ? previousRow[x - channels] ?? 0 : 0;View on GitHub (pinned to 99f24806c6)
When it happens
Trigger: Thrown at packages/electron/src/main/ipc.ts:778 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27).
Data as JSON: /api/errors/c978f75c45dc276c.
Report an issue: GitHub.