diff --git a/icons/favicon.ico b/icons/favicon.ico new file mode 100644 index 0000000..b59c733 Binary files /dev/null and b/icons/favicon.ico differ diff --git a/icons/icon-1024.png b/icons/icon-1024.png new file mode 100644 index 0000000..483cba4 Binary files /dev/null and b/icons/icon-1024.png differ diff --git a/icons/icon-16.png b/icons/icon-16.png new file mode 100644 index 0000000..f6565a5 Binary files /dev/null and b/icons/icon-16.png differ diff --git a/icons/icon-180.png b/icons/icon-180.png new file mode 100644 index 0000000..4b0de9b Binary files /dev/null and b/icons/icon-180.png differ diff --git a/icons/icon-256.png b/icons/icon-256.png new file mode 100644 index 0000000..b07b968 Binary files /dev/null and b/icons/icon-256.png differ diff --git a/icons/icon-32.png b/icons/icon-32.png new file mode 100644 index 0000000..8ace4d7 Binary files /dev/null and b/icons/icon-32.png differ diff --git a/icons/icon-48.png b/icons/icon-48.png new file mode 100644 index 0000000..3ca0775 Binary files /dev/null and b/icons/icon-48.png differ diff --git a/icons/icon-512.png b/icons/icon-512.png new file mode 100644 index 0000000..6721fa0 Binary files /dev/null and b/icons/icon-512.png differ diff --git a/icons/source-flat.svg b/icons/source-flat.svg new file mode 100644 index 0000000..375c0d1 --- /dev/null +++ b/icons/source-flat.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/icons/source-leather.png b/icons/source-leather.png new file mode 100644 index 0000000..ca02b26 Binary files /dev/null and b/icons/source-leather.png differ diff --git a/icons/source-small.svg b/icons/source-small.svg new file mode 100644 index 0000000..b9a31eb --- /dev/null +++ b/icons/source-small.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/tools/make_icons.py b/tools/make_icons.py index 1f096b5..1ab4c1d 100644 --- a/tools/make_icons.py +++ b/tools/make_icons.py @@ -61,21 +61,29 @@ def main(): ap = argparse.ArgumentParser() ap.add_argument("source", help="square-ish .svg or .png/.jpg mark") ap.add_argument("--out-dir", default="icons") + ap.add_argument("--small-from", default="", + help="optional simpler source used for 16/32/48 and the .ico, " + "because fine detail dies at tab size") + ap.add_argument("--small-max", type=int, default=48) args = ap.parse_args() if not os.path.exists(args.source): sys.exit(f"no such file: {args.source}") master = load_square(args.source) + small = load_square(args.small_from) if args.small_from else None os.makedirs(args.out_dir, exist_ok=True) for size in SIZES: + src = small if (small and size <= args.small_max) else master out = os.path.join(args.out_dir, f"icon-{size}.png") - master.resize((size, size), RESAMPLE).save(out) - print(f" {out}") + src.resize((size, size), RESAMPLE).save(out) + print(f" {out}{' (simplified)' if src is small else ''}") ico_path = os.path.join(args.out_dir, "favicon.ico") - master.resize((256, 256), RESAMPLE).save(ico_path, sizes=[(s, s) for s in ICO_SIZES]) - print(f" {ico_path} ({', '.join(str(s) for s in ICO_SIZES)})") + (small or master).resize((256, 256), RESAMPLE).save( + ico_path, sizes=[(s, s) for s in ICO_SIZES]) + print(f" {ico_path} ({', '.join(str(s) for s in ICO_SIZES)})" + f"{' (simplified)' if small else ''}") print(f"\n{len(SIZES) + 1} files in {args.out_dir}/") print("upload icon-512.png as the org avatar on both forges; the rest ship with the app")