Skip to content

Instantly share code, notes, and snippets.

@shouhei
Created May 27, 2017 13:50
Show Gist options
  • Select an option

  • Save shouhei/896d613d4b526d85c413e7563a0b1032 to your computer and use it in GitHub Desktop.

Select an option

Save shouhei/896d613d4b526d85c413e7563a0b1032 to your computer and use it in GitHub Desktop.
iosのアイコン作るスクリプト
#!/usr/local/bin/bash
BASE_IMAGE=$1
if [ $# -ne 1 ]; then
echo "Please set base png image."
exit 1
fi
sips -Z 120 $BASE_IMAGE --out Icon-60@2x.png
sips -Z 180 $BASE_IMAGE --out Icon-60@3x.png
sips -Z 76 $BASE_IMAGE --out Icon-76@.png
sips -Z 152 $BASE_IMAGE --out Icon-76@2x.png
sips -Z 167 $BASE_IMAGE --out Icon-83.5@2x.png
sips -Z 29 $BASE_IMAGE --out Icon-29@.png
sips -Z 58 $BASE_IMAGE --out Icon-29@2x.png
sips -Z 87 $BASE_IMAGE --out Icon-29@3x.png
sips -Z 40 $BASE_IMAGE --out Icon-40@.png
sips -Z 80 $BASE_IMAGE --out Icon-40@2x.png
sips -Z 120 $BASE_IMAGE --out Icon-40@3x.png
sips -Z 20 $BASE_IMAGE --out Icon-20@.png
sips -Z 40 $BASE_IMAGE --out Icon-20@2x.png
sips -Z 60 $BASE_IMAGE --out Icon-20@3x.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment