A new icon everywhere: the penguin in a crown (icons/icon2.png)
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

packaging/icons/make-icons.sh makes every icon from one picture: the Linux hicolor PNGs
(the macOS .icns and the packages take them), the window icon, the Windows .ico, the
Android adaptive foreground (62 % of the 108 dp canvas) and a solid monochrome one for
themed icons, the site's tab, header and iOS icons. The site's link preview takes the
transparent icon and names Android too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-24 15:20:01 +03:00
parent e54fb74c45
commit ed0e3b1fe1
28 changed files with 63 additions and 2 deletions

View file

@ -2,6 +2,10 @@
All notable changes are listed here. Versions follow [Semantic Versioning](https://semver.org/).
## [Unreleased]
- A new icon — a penguin in a crown — on the desktop, Android and the website.
## [1.0.2] — 2026-10-24
- Android: the update card on the main screen has a × that stops the offers (with "Undo";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 161 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before After
Before After

55
packaging/icons/make-icons.sh Executable file
View file

@ -0,0 +1,55 @@
#!/bin/sh
# Makes every icon of ChessPenguin from one picture (default icons/icon2.png): the Linux
# hicolor PNGs (also the macOS .icns and the packages take them), the window icon, the
# Windows .ico, the Android launcher icon (adaptive foreground and monochrome) and the
# site's icons. Needs ImageMagick 7 (`magick`). Run from the repository's root:
# packaging/icons/make-icons.sh [picture.png]
# The site's link preview (website/static/og-image.png) is made by website/shots/derive.py
# from the site's icon.
set -eu
src="${1:-icons/icon2.png}"
app_id=io.github.vrubelroman.chessPenguin
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
# The picture without its empty border, centred on a square with a small margin.
magick "$src" -trim +repage -resize 940x940 -background none -gravity center \
-extent 1024x1024 "$tmp/master.png"
for s in 16 24 32 48 64 128 256 512; do
magick "$tmp/master.png" -filter Lanczos -resize "${s}x${s}" \
"packaging/icons/hicolor/${s}x${s}/apps/${app_id}.png"
done
cp "packaging/icons/hicolor/256x256/apps/${app_id}.png" apps/desktop/assets/icon-256.png
magick "$tmp/master.png" -define icon:auto-resize=256,128,64,48,32,16 \
packaging/windows/chesspenguin.ico
# Android: the foreground of the adaptive icon is 108 dp, of which a circle of 66 dp is
# always seen: the picture fills 62 % of it. The monochrome one (themed icons) is one
# solid colour: everything but the white of the belly and face, which is cut out, so the
# face stays readable.
res=androidApp/app/src/main/res
magick "$tmp/master.png" -resize 635x635 -background none -gravity center \
-extent 1024x1024 "$tmp/fg.png"
magick "$tmp/fg.png" -alpha extract -threshold 50% "$tmp/shape.png"
magick "$tmp/fg.png" -alpha off -colorspace Gray -threshold 78% -negate "$tmp/dark.png"
magick "$tmp/shape.png" "$tmp/dark.png" -compose Multiply -composite "$tmp/mono-alpha.png"
magick -size 1024x1024 xc:white "$tmp/mono-alpha.png" -alpha off \
-compose CopyOpacity -composite "$tmp/mono.png"
for d in mdpi:108 hdpi:162 xhdpi:216 xxhdpi:324 xxxhdpi:432; do
dir="${d%%:*}"; px="${d#*:}"
magick "$tmp/fg.png" -filter Lanczos -resize "${px}x${px}" -quality 95 \
"$res/mipmap-$dir/ic_launcher_foreground.webp"
magick "$tmp/mono.png" -filter Lanczos -resize "${px}x${px}" -quality 95 \
"$res/mipmap-$dir/ic_launcher_monochrome.webp"
done
# The site: tab icons, the header logo, the home screen icon of iOS (opaque, as iOS
# fills a transparent one with black).
img=website/static/img
for s in 16 32 64; do
magick "$tmp/master.png" -filter Lanczos -resize "${s}x${s}" "$img/icon-$s.png"
done
magick "$tmp/master.png" -resize 150x150 -background '#EAF2F9' -gravity center \
-extent 180x180 -alpha remove "$img/icon-180.png"
echo "icons made from $src"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

Before After
Before After

View file

@ -53,12 +53,14 @@ def og_image():
for x in range(w):
d.line([(x, 0), (x, h)], fill=max(0, min(255, int(255 * (1 - (x - 380) / 360)))))
img.paste((22, 23, 24), mask=shade)
icon = Image.open(os.path.join(STATIC, "img", "icon-180.png")).convert("RGBA").resize((128, 128), Image.LANCZOS)
# The transparent icon (the site's 180 px one has a background for iOS).
icon_path = os.path.join(os.path.dirname(STATIC), "..", "packaging", "icons", "hicolor", "256x256", "apps", "io.github.vrubelroman.chessPenguin.png")
icon = Image.open(icon_path).convert("RGBA").resize((128, 128), Image.LANCZOS)
img.paste(icon, (64, 120), icon)
d = ImageDraw.Draw(img)
d.text((64, 280), "ChessPenguin", font=font(True, 64), fill=(232, 232, 232))
d.text((64, 370), "Free chess database software", font=font(False, 34), fill=(163, 167, 173))
d.text((64, 416), "for Windows, macOS and Linux", font=font(False, 34), fill=(163, 167, 173))
d.text((64, 416), "for Windows, macOS, Linux and Android", font=font(False, 34), fill=(163, 167, 173))
img.save(os.path.join(STATIC, "og-image.png"), "PNG", optimize=True)
print("og-image.png")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Before After
Before After