Skip to content

Instantly share code, notes, and snippets.

@zserge
Created April 17, 2016 06:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zserge/12ad764c75bc3a23a524130275fdedae to your computer and use it in GitHub Desktop.
Save zserge/12ad764c75bc3a23a524130275fdedae to your computer and use it in GitHub Desktop.
#!/bin/sh
BGCOLOR='#550000'
TEXTCOLOR='#eeeeee'
TEXTFONT='Ubuntu-Light'
TEXTSIZE=72
TEXT="\nHello this is a very long text\nwrapped in many lines"
# Put screenshot into a frame, change +86+242 if you change a frame PNG
composite -geometry +86+242 $1 frame.png $2
# Scale image down (assuming that the frame and the original screenshots are
# too large)
convert $2 -resize 720x $2 # 720x1280
# Scale image up and align phone frame to the center+bottom
convert $2 -gravity south -background $BGCOLOR -extent 1008x1782 $2
# Add text to the center+top
convert $2 -fill $TEXTCOLOR \
-font $TEXTFONT -pointsize $TEXTSIZE -gravity north \
-annotate +0+0 "$TEXT" $2
# Scale up to FullHD adding some padding on the left/right sides
convert $2 -gravity center -background $BGCOLOR -extent 1080x1920 $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment