Skip to content

Instantly share code, notes, and snippets.

@DenTelezhkin
Created September 30, 2016 07:56
Show Gist options
  • Save DenTelezhkin/1a04ab4eceb2b5fac2cf7ae00b0863e8 to your computer and use it in GitHub Desktop.
Save DenTelezhkin/1a04ab4eceb2b5fac2cf7ae00b0863e8 to your computer and use it in GitHub Desktop.

Revisions

  1. DenTelezhkin revised this gist Sep 30, 2016. No changes.
  2. DenTelezhkin revised this gist Sep 30, 2016. No changes.
  3. DenTelezhkin created this gist Sep 30, 2016.
    25 changes: 25 additions & 0 deletions prepare_icons.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    #!/bin/bash
    f=$(pwd)

    sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork"
    sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x"

    sips --resampleWidth 20 "${f}/${1}" --out "${f}/Icon-20.png"
    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}/Icon-29.png"
    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}/Icon-40.png"
    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}/Icon-76.png"
    sips --resampleWidth 152 "${f}/${1}" --out "${f}/[email protected]"

    sips --resampleWidth 167 "${f}/${1}" --out "${f}/[email protected]"