Initial commit — Oak Ridge Makers Group Tronbyt app
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from PIL import Image
|
||||
|
||||
SRC = "/home/poprhythm/Downloads/main-logo.png"
|
||||
OUT = "/home/poprhythm/ormakers-tronbyt-app/images/logo.png"
|
||||
|
||||
img = Image.open(SRC).convert("RGBA")
|
||||
w, h = img.size
|
||||
|
||||
size = max(w, h)
|
||||
square = Image.new("RGBA", (size, size), (0, 0, 0, 0))
|
||||
square.paste(img, ((size - w) // 2, (size - h) // 2))
|
||||
|
||||
square.resize((64, 64), Image.LANCZOS).save(OUT)
|
||||
print(f"source: {w}x{h}, output: 64x64 -> {OUT}")
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/../images"
|
||||
|
||||
declare -A ICONS=(
|
||||
[hand-saw]="delapouite"
|
||||
[sewing-needle]="lorc"
|
||||
[soldering-iron]="caro-asercion"
|
||||
)
|
||||
|
||||
for name in "${!ICONS[@]}"; do
|
||||
artist="${ICONS[$name]}"
|
||||
svg="$name.svg"
|
||||
curl -sL -o "$svg" "https://game-icons.net/icons/ffffff/transparent/1x1/${artist}/${name}.svg"
|
||||
convert -background none -density 300 "$svg" -resize 32x32 -brightness-contrast 0x35 "$name.png"
|
||||
rm "$svg"
|
||||
done
|
||||
Reference in New Issue
Block a user