Created
April 21, 2017 16:56
-
-
Save shanev/73817e9932a000d3d763dced78f60473 to your computer and use it in GitHub Desktop.
Generate an iOS app icon with a gradient background using an input image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
FILE="$DIR/../Design/appicon-foreground.svg" | |
OUTPUT_LOCATION="$DIR/../iTunes" | |
# convert svg asset to png | |
convert -density 2000 -resize 1024x1024 -background none $FILE appicon-foreground.png | |
# create a linear gradient background | |
convert -size 1024x1024 -define gradient:direction=southwest gradient:yellow-green linear_gradient.png | |
# overlay monkey on background | |
composite -gravity center appicon-foreground.png linear_gradient.png $OUTPUT_LOCATION/iTunesArtwork@2x.png | |
# delete intermediary assets | |
rm linear_gradient.png | |
rm appicon-foreground.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment