fix(client): regen all PNG icons as RGBA so macOS Tauri bundler accepts them
Tauri's macOS bundler validates that every PNG referenced from
src-tauri/icons/ is RGBA. Our previous rebuild-icons.py wrote RGB PNGs
because the trim/pad pipeline lives in RGB to keep transparent edges
out of the glassy logo. macOS build failed with:
error: proc macro panicked
--> src/lib.rs:1073:16
message: icon /.../desktop/src-tauri/icons/32x32.png is not RGBA
Fix: scripts/rebuild-icons.py now does `.convert("RGBA")` on every
PNG output before saving. Alpha is fully opaque (255) — the rounded
glass edges retain their look on any background since we paint on
solid white in load_trimmed_square. Same files keep working for
Windows .ico embedding (which accepts RGBA fine).
Regenerate all 17 PNG outputs (32/64/128/128@2x/icon.png + 9 Square*
+ StoreLogo + public/app-icon.png) and the derived .ico/.icns.
Mac side: pull this commit and re-run `bun run build:macos-arm64`.
Windows side: no change in behavior (Tauri's NSIS bundler doesn't
care about PNG color mode).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Before Width: | Height: | Size: 414 KiB After Width: | Height: | Size: 465 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 414 KiB After Width: | Height: | Size: 465 KiB |
@@ -48,7 +48,13 @@ def main():
|
||||
}
|
||||
for path, size in sizes.items():
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
base.resize((size, size), Image.LANCZOS).save(path, "PNG")
|
||||
# Tauri's macOS bundler rejects non-RGBA PNGs ("icon ... is not RGBA").
|
||||
# Force RGBA on every PNG output so the same files work for both
|
||||
# Windows .ico embedding and macOS .icns embedding without per-platform
|
||||
# branches. Alpha channel is fully opaque (255) since we paint on
|
||||
# solid white in load_trimmed_square — the rounded glass edges of the
|
||||
# logo retain their painted look on any background.
|
||||
base.resize((size, size), Image.LANCZOS).convert("RGBA").save(path, "PNG")
|
||||
print(f"wrote {path} ({size})")
|
||||
|
||||
# Windows Square*Logo / StoreLogo
|
||||
@@ -66,7 +72,13 @@ def main():
|
||||
}
|
||||
for name, size in win_sizes.items():
|
||||
path = TAURI_ICONS / name
|
||||
base.resize((size, size), Image.LANCZOS).save(path, "PNG")
|
||||
# Tauri's macOS bundler rejects non-RGBA PNGs ("icon ... is not RGBA").
|
||||
# Force RGBA on every PNG output so the same files work for both
|
||||
# Windows .ico embedding and macOS .icns embedding without per-platform
|
||||
# branches. Alpha channel is fully opaque (255) since we paint on
|
||||
# solid white in load_trimmed_square — the rounded glass edges of the
|
||||
# logo retain their painted look on any background.
|
||||
base.resize((size, size), Image.LANCZOS).convert("RGBA").save(path, "PNG")
|
||||
print(f"wrote {path} ({size})")
|
||||
|
||||
# ICO with multi-resolution.
|
||||
|
||||