{"record":{"id":"b44400577c1714c9","repo":"Wox-launcher/Wox","slug":"path-is-not-a-png-file-b44400","errorCode":null,"errorMessage":"{path} is not a PNG file","messagePattern":"(.+?) is not a PNG file","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"assets/generate_app_icons.sh","lineNumber":72,"sourceCode":"def paeth(left, up, up_left):\n    estimate = left + up - up_left\n    distance_left = abs(estimate - left)\n    distance_up = abs(estimate - up)\n    distance_up_left = abs(estimate - up_left)\n    if distance_left <= distance_up and distance_left <= distance_up_left:\n        return left\n    if distance_up <= distance_up_left:\n        return up\n    return up_left\n\n\ndef decode_png(path):\n    # Decode common 8-bit non-interlaced PNG files into straight RGBA bytes.\n    with open(path, \"rb\") as handle:\n        data = handle.read()\n\n    if not data.startswith(b\"\\x89PNG\\r\\n\\x1a\\n\"):\n        raise SystemExit(f\"{path} is not a PNG file\")\n\n    width = None\n    height = None\n    bit_depth = None\n    color_type = None\n    palette = None\n    transparency = b\"\"\n    idat = bytearray()\n    offset = 8\n\n    while offset < len(data):\n        length = struct.unpack(\">I\", data[offset : offset + 4])[0]\n        offset += 4\n        kind = data[offset : offset + 4]\n        offset += 4\n        payload = data[offset : offset + length]\n        offset += length\n        offset += 4","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/Wox-launcher/Wox/blob/1659730fcb37154f26497e07308b1f8789d659fe/assets/generate_app_icons.sh#L54-L90","documentation":"Error \"{path} is not a PNG file\" thrown in Wox-launcher/Wox.","triggerScenarios":"Thrown at assets/generate_app_icons.sh:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1659730fcb37154f26497e07308b1f8789d659fe","analyzedAt":"2026-08-15T23:31:07.596Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}