Created
May 7, 2021 03:21
-
-
Save jimye/086d506ace7981cabd8c8c8434a5b369 to your computer and use it in GitHub Desktop.
Create icns file
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/bash | |
input_filepath="app_icon.png" | |
output_iconset_name="app_icon.iconset" | |
mkdir $output_iconset_name | |
sips -z 16 16 $input_filepath --out "${output_iconset_name}/icon_16x16.png" | |
sips -z 32 32 $input_filepath --out "${output_iconset_name}/icon_16x16@2x.png" | |
sips -z 32 32 $input_filepath --out "${output_iconset_name}/icon_32x32.png" | |
sips -z 64 64 $input_filepath --out "${output_iconset_name}/icon_32x32@2x.png" | |
sips -z 128 128 $input_filepath --out "${output_iconset_name}/icon_128x128.png" | |
sips -z 256 256 $input_filepath --out "${output_iconset_name}/icon_128x128@2x.png" | |
sips -z 256 256 $input_filepath --out "${output_iconset_name}/icon_256x256.png" | |
sips -z 512 512 $input_filepath --out "${output_iconset_name}/icon_256x256@2x.png" | |
sips -z 512 512 $input_filepath --out "${output_iconset_name}/icon_512x512.png" | |
iconutil -c icns $output_iconset_name | |
rm -R $output_iconset_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment