Download an appetizer binary from the release section and copy it into the folder /usr/local/bin so that it can be launched from anywhere in the command line.
Run sudo chmod 777 /usr/local/bin/appetizer in the command line to make the file executable.
Compile the source
You can compile the source using the command line:
swift build -c release
Then copy the appetizer binary from the folder .build/release to /usr/local/bin so that it can be launched from anywhere in the command line.
Appetizer is a macOS tool that takes an image (in PNG or JPG format) and makes suitable iOS and Android images and app icons from it.
There is a command line version and a GUI version of the app.
Usage - Command Line App
Command Line
The command
appetizer --help
will print information about the arguments.Android Icon
appetizer icon.png 100 100 --androidIcon output
This will create 5 folders in an
output
folder, each containingicon.png
images of different sizes:The image in
drawable-mdpi
will have the size 100x100. The others will have greater size.You can set another name for the android folders, like
mipmap
:appetizer icon.png 100 100 --androidIcon output --androidFolderPrefix mipmap
iOS Icon
appetizer icon.png 100 100 --iosIcon output
This will create 3 images in the
output
folder:The size will be 100x100 for
icon.png
, 200x200 foricon@2x.png
and 300x300 foricon@3x.png
.iOS App Icon
appetizer icon.png 100 100 --iosAppIcon output
This will create many images in the
output
folder:The images have each size needed to fully specify an app icon on iOS for the iPhone and the iPad, including the 1024x1024 App Store icon.
(The provided size arguments
100 100
are ignored for app icons)Single Icon
appetizer icon.png 100 100 --singleIcon output
This will create one image in the
output
folder:icon.png
. The size will be 100x100.Icon Name
By default, the generated icons will have the same name as the original icon.
The name can be changed using the
--name
argument:appetizer icon.png 100 100 --singleIcon output --name monkey
The generated icon will be
monkey.png
.Removing White Background
With a source image having white background and a black icon
, you might want wo remove the white backgound so that it becomes transparent.
appetizer icon.png 100 100 --singleIcon output --clearWhite
Adding the

--clearWhite
parameter, the result will be an icon with transparent background:Coloring
Using the
--color
argument, all opaque regions of the icon will be colored:appetizer icon.png 100 100 --singleIcon output --color #ff5500
Using the source image
, the resulting image will look like this 
Padding
You can add transparent padding to the generated icon using the
--padding
argument:appetizer icon.png 100 100 --singleIcon output --padding 20
Source and generated icon in comparison:

Or you can remove padding by providing a negative value:
appetizer icon.png 42 42 --singleIcon output --padding -2
This can be used to remove unwanted borders:

Installation - Command Line App
Binary release
Download an appetizer binary from the release section and copy it into the folder
/usr/local/bin
so that it can be launched from anywhere in the command line.Run
sudo chmod 777 /usr/local/bin/appetizer
in the command line to make the file executable.Compile the source
You can compile the source using the command line:
swift build -c release
Then copy the
appetizer
binary from the folder.build/release
to/usr/local/bin
so that it can be launched from anywhere in the command line.