{"record":{"id":"c42d91aaf39e77cd","repo":"Wox-launcher/Wox","slug":"assets-app-png-must-be-square","errorCode":null,"errorMessage":"assets/app.png must be square","messagePattern":"assets/app\\.png must be square","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"assets/generate_app_icons.sh","lineNumber":303,"sourceCode":"                        clamp_byte(blue / alpha),\n                        clamp_byte(alpha * 255),\n                    )\n                )\n            output_offset += 4\n\n    return output\n\n\ndef write_file(path, data):\n    os.makedirs(os.path.dirname(path), exist_ok=True)\n    with open(path, \"wb\") as handle:\n        handle.write(data)\n    log(f\"wrote {rel(path)}\")\n\n\nsource_width, source_height, source_rgba = decode_png(source_png)\nif source_width != source_height:\n    raise SystemExit(\"assets/app.png must be square\")\n\npng_cache = {}\n\n\ndef app_icon_png(size):\n    if size not in png_cache:\n        log(f\"resize {source_width}x{source_height} -> {size}x{size}\")\n        png_cache[size] = encode_png(size, size, resize_rgba(source_rgba, source_width, source_height, size, size))\n    return png_cache[size]\n\n\ndef save_png(path, size):\n    write_file(path, app_icon_png(size))\n\n\ndef save_ico(path, sizes):\n    # Store PNG frames inside the ICO so Windows can choose the nearest native size.\n    frames = [(size, app_icon_png(size)) for size in sizes]","sourceCodeStart":285,"sourceCodeEnd":321,"githubUrl":"https://github.com/Wox-launcher/Wox/blob/1659730fcb37154f26497e07308b1f8789d659fe/assets/generate_app_icons.sh#L285-L321","documentation":"Error \"assets/app.png must be square\" thrown in Wox-launcher/Wox.","triggerScenarios":"Thrown at assets/generate_app_icons.sh:303 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"}