s9icongen
s9icongen copied to clipboard
App icon generator for iPhone & iPad (iOS 7 and above)
s9icongen - App icon generator
Introduction
The Ruby script s9icongen
automatically generates icon files of all necessary sizes for iPhone and/or iPad apps (iOS 7 and above). It uses imagemagick
and the gem rmagick
.
Installation
Install imagemagick
and rmagick
via
brew install imagemagick
gem install rmagick
Usage
Just run the script
./s9icongen.rb my_icon.png
The first argument is the filename of the icon image (should be quadratic and at least 1024x1024 in size). By default only iPhone icon files are generated. If one supplies a second argument (ipad
or universal
), iPad icon files or iPhone/iPad icon files are generated respectively.
Example
The command
./s9icongen.rb my_icon.png universal
will generate
29x29: icons/Icon-29.png
58x58: icons/[email protected]
87x87: icons/[email protected]
80x80: icons/[email protected]
120x120: icons/[email protected]
120x120: icons/[email protected]
180x180: icons/[email protected]
29x29: icons/Icon-29.png
58x58: icons/[email protected]
40x40: icons/Icon-40.png
80x80: icons/[email protected]
76x76: icons/Icon-76.png
152x152: icons/[email protected]
120x120: icons/Icon-120.png
512x512: icons/iTunesArtwork
1024x1024: icons/iTunesArtwork@2x
RubyMotion
Add the icon files to your resources directory and add the following line to your rakefile
app.icons = Dir.glob('resources/Icon*.png').map{|icon| icon.split('/').last}