https://github.com/tylertemp/jollaicon
convert your icon into Sailfish OS style
https://github.com/tylertemp/jollaicon
Last synced: 7 months ago
JSON representation
convert your icon into Sailfish OS style
- Host: GitHub
- URL: https://github.com/tylertemp/jollaicon
- Owner: TylerTemp
- License: gpl-3.0
- Created: 2015-12-05T11:21:30.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-07-07T05:53:53.000Z (almost 7 years ago)
- Last Synced: 2024-12-31T03:26:13.469Z (over 1 year ago)
- Language: Python
- Size: 201 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
jollaicon
=========
Summary
-------
`jollaicon` can convert a png file into Sailfish OS style.
Here is a Android icon set in Sailfish OS style already:
[TylerTemp-DroidSailizedIcon](https://github.com/TylerTemp/DroidSailizedIcon).
Also [here](http://talk.maemo.org/showthread.php?t=92073) and
[here](https://together.jolla.com/question/104668/custom-sailfish-os-style-icons-for-android-apps/)
It's a very little tool: it only change the shape of the icon.
You may still need to edit the file after converted.
Install
-------
It requires [python](http://python.org/) and [python-pip](https://pip.pypa.io/en/stable/installing/)
Install by:
```bash
pip install git+git://github.com/TylerTemp/jollaicon.git
```
or
```bash
git clone https://github.com/TylerTemp/jollaicon.git
cd jollaicon
pip install .
```
Then run as
```bash
jollaicon --help
```
If you're a python developer, you can use it as
```python
from jollaicon import icon
help(icon)
```
NOTE: this lib depends on python's package `cairocffi`, which depends on system's CFFI package. If you hit any problem installing, plz check and follow [cairocffi official document](https://cairocffi.readthedocs.io/en/latest/overview.html#installing-cffi)
> * On Linux, install `python-dev` and `libffi-dev` from your system’s package manager.
> * On OS X, install `pkg-config` and `libffi`, for example with [Homebrew](http://brew.sh/). You may need to [set the PKG_CONFIG_PATH environment variable](http://cffi.readthedocs.org/#macos-x).
> * On Windows, consider using [Christoph Gohlke’s unofficial binary builds](http://www.lfd.uci.edu/~gohlke/pythonlibs/#cffi).
Usage
---------
```
Usage:
$ python jollaicon.py [options]
Options:
-1, --top-left make top left rectangle instead of round
-2, --top-right make top right rectangle instead of round
-3, --bottom-right make bottom right rectangle instead of round
-4, --bottom-left make bottom left rectangle instead of round
-h, --help print this screen
-v, --version print version of this script
-f, --fill[=] fill color for transparent part. No effect when your
icon file is full-filled with color already. It
should in ``(r, g, b)`` or ``(r, g, b, alpha)``
number group. use white when this option appears but
no color specified.
path to your icon file (png format only)
output file (png format)
```
The corners of Sailfish icon are only round or rectangle.
Use `-1`, `-2`, `-3`, `-4` to set which corner is round/rectangle
Example
-----------
```
jollaicon -3 example_img/logo.png example_img/out.png
```
source image:

result image:

LISENSE
------------
1. anything under `example_img` folder: all rights reserved to [steam](https://store.steampowered.com/)
2. other file's license please read [LICENSE](LICENSE)