42_so_long/dev/import_assets_text_26px.sh
mcolonna bc9cee22d7 feat: comic sans move number (also fix *)
fix: the limits of an asset can exceed the image dimensions
2024-04-18 21:16:48 +02:00

10 lines
255 B
Bash
Executable file

#!/bin/sh
for PNG in $(find . -type f -name "*.png")
do
# resize
convert "$PNG" -resize x26 "$PNG"
# extract color and alpha
convert "$PNG" -negate -alpha opaque "${PNG%.png}.xpm"
convert "$PNG" -alpha extract "${PNG%.png}.alpha.xpm"
rm "$PNG"
done