create A6 size and put a qr on it
Before Width: | Height: | Size: 4.7 MiB After Width: | Height: | Size: 4.9 MiB |
BIN
calendar.jpg
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
output_A6.jpg
Normal file
After Width: | Height: | Size: 652 KiB |
BIN
output_A6_qr.jpg
Normal file
After Width: | Height: | Size: 744 KiB |
BIN
output_landscape.jpg
Normal file
After Width: | Height: | Size: 327 KiB |
BIN
output_poster.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
68
script.sh
@ -1,17 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
TEXTTITLE=$(printf "\t\t(Un)Repair Cafe")
|
TEXTTITLE=$(printf "(Un)Repair Cafe")
|
||||||
TEXTSUBTITLE="eWaste Walk"
|
TEXTSUBTITLE="Every 2nd and 4th thursday"
|
||||||
TEXTDATE=$(printf "30/01\n1730")
|
TEXTDATE=$(printf "30/01\n1730")
|
||||||
TEXTLOCATION="CATU"
|
TEXTLOCATION="CATU"
|
||||||
TEXTLOCATIONLONG=$(printf "CATU\nCatullusweg 11")
|
TEXTLOCATIONLONG=$(printf "CATU\nCatullusweg 11\nRotterdam")
|
||||||
DESCRIPTION=$(printf "Let's look for eWaste in and around Rotterdam Lombardijen")
|
DESCRIPTION=$(printf "Do you dig trough trash only to\n find treasure? Are you interested in \nbuilding servers? Do you take the shop\n out of photoshop? Is a printer jam your \n kind of jam? \n Come hang at the (un)repair cafe!")
|
||||||
|
QRDESCRIPTION=$(printf "*Check out calendar.klank.school \n for more details!")
|
||||||
|
|
||||||
|
|
||||||
# Create the image with text overlays
|
# Create the image with text overlays landscape
|
||||||
convert assets/landscape_2.jpg \
|
convert assets/landscape_2.jpg \
|
||||||
-gamma 1 +level 0,1000 -white-threshold 999 \
|
-gamma 1 +level 0,1000 -white-threshold 999 \
|
||||||
-font /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Light.otf \
|
-font Courier \
|
||||||
-wave -20x4 \
|
-wave -20x4 \
|
||||||
-weight 900 \
|
-weight 900 \
|
||||||
-fill white \
|
-fill white \
|
||||||
@ -22,20 +23,51 @@ convert assets/landscape_2.jpg \
|
|||||||
-wave -2x0 \
|
-wave -2x0 \
|
||||||
output_landscape.jpg
|
output_landscape.jpg
|
||||||
|
|
||||||
|
# create a portrait poster
|
||||||
convert assets/poster_6.jpg \
|
convert assets/poster_6.jpg \
|
||||||
-gamma 1 +level 0,1200 \
|
-gamma 1 +level 0,2200 \
|
||||||
-morphology Distance Euclidean:4,180 -auto-level \
|
-morphology Distance Euclidean:4,180 -auto-level \
|
||||||
-font FreeMono \
|
-font Courier \
|
||||||
|
-wave -20x4 \
|
||||||
-weight 900 \
|
-weight 900 \
|
||||||
-fill black \
|
-fill white \
|
||||||
\( -pointsize 200 -draw "rotate 7 gravity northwest text 350,400 '$TEXTTITLE'" \) \
|
\( -pointsize 120 -draw "rotate 7 gravity northwest text 250,200 '$TEXTTITLE'" \) \
|
||||||
-fill black \
|
-fill white \
|
||||||
\( -pointsize 100 -draw "rotate -25 gravity northwest text 150, 2320 '$TEXTSUBTITLE'" \) \
|
\( -pointsize 70 -draw "rotate 6 gravity northwest text 250,380 '$TEXTSUBTITLE'" \) \
|
||||||
-fill black \
|
-fill white \
|
||||||
\( -pointsize 100 -draw "rotate 4 gravity northwest text
|
\( -pointsize 48 -interline-spacing 5 -draw "rotate 6 gravity northwest text 320,580 '$TEXTLOCATIONLONG'" \) \
|
||||||
500,1150 '$TEXTDATE'" \) \
|
|
||||||
-fill black \
|
|
||||||
\( -pointsize 100 -draw "rotate 2 gravity southeast text 540,1500 '$TEXTLOCATIONLONG'" \) \
|
|
||||||
wave -2x0 \
|
wave -2x0 \
|
||||||
\( -pointsize 80 -draw "rotate 2 gravity southeast text 540,700 '$DESCRIPTION'" \) \
|
\( -pointsize 40 -interline-spacing 20 -draw "rotate 1 gravity southwest text 300,360 '$DESCRIPTION'" \) \
|
||||||
output_poster.jpg
|
output_poster.jpg
|
||||||
|
|
||||||
|
# Create an A6 poster
|
||||||
|
convert assets/poster_1.jpg \
|
||||||
|
-resize "1240x1748" \
|
||||||
|
-gamma 0.3 +level 10,1000 \
|
||||||
|
-morphology Distance Euclidean:4,80 -auto-level \
|
||||||
|
-font Courier -weight Bold \
|
||||||
|
-wave -10x4 \
|
||||||
|
-fill white \
|
||||||
|
\( -pointsize 80 -draw "rotate 7 gravity northwest text 150,150 '$TEXTTITLE'" \) \
|
||||||
|
-fill white \
|
||||||
|
\( -pointsize 50 -draw "rotate 7 gravity northwest text 160,250 '$TEXTSUBTITLE'" \) \
|
||||||
|
-fill white \
|
||||||
|
\( -pointsize 30 -interline-spacing 5 -draw "rotate 6 gravity northwest text 240,450 '$TEXTLOCATIONLONG'" \) \
|
||||||
|
wave -2x0 \
|
||||||
|
\( -pointsize 30 -interline-spacing 10 -draw "rotate 1 gravity southwest text 200,300 '$DESCRIPTION'" \) \
|
||||||
|
output_A6.jpg
|
||||||
|
|
||||||
|
convert calendar.jpg -background none -rotate 10 -resize "50%" tmp_calendar.png
|
||||||
|
|
||||||
|
# Put a QR code on an A6 poster
|
||||||
|
convert output_A6.jpg \
|
||||||
|
-fill tomato \
|
||||||
|
-draw "rotate 10 rectangle 840,690 1120,970" \
|
||||||
|
temp_overlay.png \
|
||||||
|
-gravity center \
|
||||||
|
-geometry +200+100 \
|
||||||
|
-font Courier -weight Bold \
|
||||||
|
-pointsize 24 -interline-spacing 10 -draw "rotate 10 gravity center text 200,-120 '$QRDESCRIPTION'" \
|
||||||
|
-composite output_A6_qr.jpg
|
||||||
|
|
||||||
|
rm tmp_calendar.png
|