Skip to content

Use a single command to resize a local or remote image to all the required sizes and formats used in various forms of development.

Notifications You must be signed in to change notification settings

marcusfrdk/create-app-icon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

Create App Icon

top language code size last commit issues contributors

Use a single command to resize a local or remote image to all the required sizes and formats used in various forms of development.

Get Started

Requirements

  • Python 3.6 or higher

Installation

To get started with the package, run the following commands in your terminal:

git clone https://github.com/marcusfrdk/create-app-icon.git # or download the repository manually
cd create-app-icon
pip3 install -r requirements.txt

If you are on Windows, use pip instead of pip3

Supported Images

This project uses Pillow to handle image files, here's the list.

Note: If you round an image with transparency, the images background will be set to black.

Usage

Examples

If you are on Windows, use python instead of python3

Local image

python3 main.py ./path/to/image.jpg

Remote image

python3 main.py "https://example.com/image.jpg" # make sure to stringify the url

Specific preset

python3 main.py ./path/to/image.jpg --{PRESET}

Align image

python3 main.py ./path/to/image.jpg --align top # aligns vertically
python3 main.py ./path/to/image.jpg --align left # aligns horizontally
python3 main.py ./path/to/image.jpg --align bottom right # aligns both vertically and horizontally

Custom Favicon Border Radius

python3 main.py ./path/to/image.jpg --radius 15 # percentage (0-100)

Command Line Arguments

Argument Description Type
path path or uri to image str
--ios generate ios icons bool
--ipad generate iPad icons bool
--apple-watch generate Apple Watch icons bool
--android generate Android icons bool
--web generate Web icons bool
-r, --radius sets the border radius of the favicon bool
-a, --align aligns the image top, right, bottom, left

Aliasing (Linux/MacOS)

This project works relatively to the current working directory, so adding an alias to the script can make it easier to use. To add an alias, add the following line to your .bashrc or .zshrc file:

alias cai="python3 /path/to/create-app-icon/main.py"

Credits

About

Use a single command to resize a local or remote image to all the required sizes and formats used in various forms of development.

Topics

Resources

Stars

Watchers

Forks

Languages