Skip to content

Instantly share code, notes, and snippets.

@limtbk
Created December 18, 2015 08:50
Show Gist options
  • Save limtbk/1bcc8f4fd4ea81e593e3 to your computer and use it in GitHub Desktop.
Save limtbk/1bcc8f4fd4ea81e593e3 to your computer and use it in GitHub Desktop.
iOS icons automate generator
#!/bin/bash
f=$(pwd)
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork"
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/${2}-29.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/${2}-29@2x.png"
sips --resampleWidth 87 "${f}/${1}" --out "${f}/${2}-29@3x.png"
sips --resampleWidth 40 "${f}/${1}" --out "${f}/${2}-40.png"
sips --resampleWidth 80 "${f}/${1}" --out "${f}/${2}-40@2x.png"
sips --resampleWidth 120 "${f}/${1}" --out "${f}/${2}-40@3x.png"
sips --resampleWidth 120 "${f}/${1}" --out "${f}/${2}-60@2x.png"
sips --resampleWidth 180 "${f}/${1}" --out "${f}/${2}-60@3x.png"
sips --resampleWidth 76 "${f}/${1}" --out "${f}/${2}-76.png"
sips --resampleWidth 152 "${f}/${1}" --out "${f}/${2}-76@2x.png"
sips --resampleWidth 167 "${f}/${1}" --out "${f}/${2}-83.5@2x.png"
sips --resampleWidth 48 "${f}/${1}" --out "${f}/${2}-24@2x.png"
sips --resampleWidth 55 "${f}/${1}" --out "${f}/${2}-27.5@2x.png"
sips --resampleWidth 88 "${f}/${1}" --out "${f}/${2}-44@2x.png"
sips --resampleWidth 172 "${f}/${1}" --out "${f}/${2}-86@2x.png"
sips --resampleWidth 196 "${f}/${1}" --out "${f}/${2}-98@2x.png"
@limtbk
Copy link
Author

limtbk commented Dec 18, 2015

Usage:
genicon.sh inputfile.png nameprefix
Input file should be at least 1024 pixels width and height

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment