summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-07-21 15:17:30 -0500
committerZach van Rijn <me@zv.io>2021-07-21 15:17:30 -0500
commit9dda7788e378d9452de82a36549d3c32d22c6715 (patch)
tree13acf4e9874f5abb228a2cadc2fabec976ab96e3
parent6ac3a27b7a040dd85734ed9019664b936cc1641b (diff)
downloadsite-ng-9dda7788e378d9452de82a36549d3c32d22c6715.tar.gz
site-ng-9dda7788e378d9452de82a36549d3c32d22c6715.tar.bz2
site-ng-9dda7788e378d9452de82a36549d3c32d22c6715.tar.xz
site-ng-9dda7788e378d9452de82a36549d3c32d22c6715.zip
Generate logos for WordPress theme.
-rwxr-xr-xassets/images/polyguin.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/assets/images/polyguin.sh b/assets/images/polyguin.sh
index 2861a6b..a6952b4 100755
--- a/assets/images/polyguin.sh
+++ b/assets/images/polyguin.sh
@@ -101,12 +101,13 @@ apk add graphicsmagick imagemagick;
# x28 is GitLab
# x54 is Website
# x200 is SPI project page
+# x900 is WordPress theme
#
# This runs inside Docker because of ImageMagick bugs and GM is
# the only free software I can find that doesn't screw this up.
#
for c in color black white; do
-for r in x28 x54 x200; do
+for r in x28 x54 x200 x900; do
gm convert -trim -density 600 -resize ${r} -background none polyguin_${c}.svg gen_polyguin_${c}_${r}.png;
magick convert -auto-level -brightness-contrast -5x+25 gen_polyguin_${c}_${r}.png gen_polyguin_${c}_${r}.png;
chown 1000:1000 gen_polyguin_${c}_${r}.png;
@@ -123,11 +124,12 @@ done # c
# x28 is GitLab
# x54 is Website
# x200 is SPI project page
+# x900 is WordPress theme
#
# GM does not support PSD anymore!
#
find . -type f -name "*.psd" | cut -d'/' -f2 | while read k; do
-for r in x28 x54 x200; do
+for r in x28 x54 x200 x900; do
magick convert -resize ${r} "${k}[0]" "gen_${k%*.psd}_${r}.png";
chown 1000:1000 "gen_${k%*.psd}_${r}.png";
done
@@ -140,7 +142,7 @@ done
# Contrast suffers a bit but these are great on image backgrounds.
#
for c in color black white; do
-for r in x28 x54 x200; do
+for r in x28 x54 x200 x900; do
# transparent black polyguin
gm composite gen_polyguin_${c}_${r}.png gen_polylogo_template_black_${r}.png gen_polylogo_black_${c}_${r}.png;
chown 1000:1000 gen_polylogo_black_${c}_${r}.png;
@@ -156,7 +158,7 @@ done # c
#
# FIXME: improve contrast.
#
-for r in x28 x54 x200; do
+for r in x28 x54 x200 x900; do
# solid black color --> grayscale polyguin
magick convert -colorspace Gray gen_polylogo_black_color_${r}.png gen_polylogo_black_mono_${r}.png;
chown 1000:1000 gen_polylogo_black_mono_${r}.png;
@@ -185,6 +187,12 @@ chown 1000:1000 icons/gen_polyguin_color_favicon.ico;
magick convert -background none -gravity center -resize 96x96 -extent 96x96 polyguin_color.svg gen_polyguin_color_avatar.png;
chown 1000:1000 gen_polyguin_color_avatar.png;
+##
+# WordPress theme screenshot is 1200x900. MUST be this.
+#
+magick convert -background none -gravity center -resize 1200x900 -extent 1200x900 gen_polylogo_black_color_x900.png gen_polyguin_color_wordpress.png;
+chown 1000:1000 gen_polyguin_color_wordpress.png;
+
#===============================================================
EOF
#===============================================================