Commit 9dda7788 authored by Zach van Rijn's avatar Zach van Rijn
Browse files

Generate logos for WordPress theme.

parent 6ac3a27b
......@@ -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
#===============================================================
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment