#source-file #icons #size #xcode #single #generate #rusty-iconz

yanked iconz

A simple CLI to generate all the necessary Xcode icon sizes from one single source file

0.2.2 Jun 10, 2020
0.2.1 Jun 8, 2020
0.2.0 Jun 8, 2020

#15 in #xcode

Download history 14/week @ 2024-02-25 9/week @ 2024-03-10 45/week @ 2024-03-31

54 downloads per month

MIT license

12KB
178 lines

rusty-iconz

ubuntu macos windows license

A simple CLI to generate all those pesky Xcode icon sizes from one single source file. This is the first project I've written in Rust so there will be plenty of bad code but that's okay :)

NEW: iconz now has some decent error handling. No more thread panics!

Install from Cargo

You must have rust & cargo installed before you can install iconz.

Install the latest published version iconz:

$ cargo install iconz

Building from source

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

Clone the repository

$ git clone https://github.com/zhooda/rusty-iconz.git
$ cd rusty-iconz

Build/Run for debug using Cargo

$ cargo run # with command line arguments OR
$ cargo build # to compile but not run

# The binary will be rusty-iconz/target/debug/iconz

Build for release (if you want to add it to your $PATH)

$ cargo build --release
$ cargo install
# The binary will be rusty-iconz/target/release/iconz

Usage

If you used cargo install you can simply call it like any other command. The only command line arguments needed are source image and icon directory

$ iconz --magic sourceimage.png icondir
    iconz v0.2.2
    make xcode icons
    #blacklivesmatter https://www.blacklivesmatters.com

     appstore.png ➜ ./testdir/AppIcon20x20@2x
     appstore.png ➜ ./testdir/AppIcon20x20@3x
     appstore.png ➜ ./testdir/AppIcon29x29@2x
     appstore.png ➜ ./testdir/AppIcon29x29@3x
     appstore.png ➜ ./testdir/AppIcon40x40@2x
     appstore.png ➜ ./testdir/AppIcon40x40@3x
     appstore.png ➜ ./testdir/AppIcon60x60@2x
     appstore.png ➜ ./testdir/AppIcon60x60@3x
    # ...
    kthxbye;

Command line flags

Flag Description
no flag Uses -i by default
-i, --image Uses CatmullRom algorithm for resizing

Contributing

Pull requests are welcome.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Dependencies

~15–25MB
~161K SLoC