Skip to content

Instantly share code, notes, and snippets.

@alexaubry
Forked from jessedc/iOS Icon.png bash script
Last active July 5, 2018 04:33
Show Gist options
  • Save alexaubry/a71359a8708985176adf3a8bc99763f9 to your computer and use it in GitHub Desktop.
Save alexaubry/a71359a8708985176adf3a8bc99763f9 to your computer and use it in GitHub Desktop.
A simple bash script using OSX command line tool sips to resample a 1024x1024 image
#!/bin/bash
f=$(pwd)
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork.png"
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 20 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 40 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 60 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 87 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 40 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 80 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 120 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 120 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 180 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 76 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 152 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 167 "${f}/${1}" --out "${f}/[email protected]"
@alexaubry
Copy link
Author

Updated to support Xcode 8 AppIcon assets catalog.

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