-
Notifications
You must be signed in to change notification settings - Fork 0
/
socialpreview.sh
21 lines (21 loc) · 970 Bytes
/
socialpreview.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
fileName="socialpreview"
marginRight=150
fontFamily="/usr/share/fonts/font/SourceSans3-"
fontType=".otf"
colorPink="245,169,184"
colorBlue="91,206,250"
colorWhite="255,255,255"
rm -f "${fileName}.png"
convert -size 2048x1024 xc:"rgb(${colorPink})" -fill "rgb(${colorBlue})" -draw "rectangle 2008,0 2048,2048" "${fileName}.bmp"
convert -draw "text ${marginRight},25 'Otokonoko'" -draw "text ${marginRight},200 'University'" -fill "rgb(${colorWhite})" -pointsize 140 -font "${fontFamily}Bold${fontType}" -gravity NorthEast "${fileName}.bmp" "${fileName}.bmp"
convert -draw "text ${marginRight},400 'Kagurazaka'" -fill "rgb(${colorWhite})" -pointsize 100 -style Italic -font "${fontFamily}Light${fontType}" -gravity NorthEast "${fileName}.bmp" "${fileName}.bmp"
convert "${fileName}.bmp" -resize 1280x640 "${fileName}.png"
rm -f "${fileName}.bmp"
unset fileName
unset marginRight
unset fontFamily
unset fontType
unset colorPink
unset colorBlue
unset colorWhite