Render Geometry Dash icons
Project description
gdicons
A Python library to render Geometry Dash icons.
Usage
Import the library like so:
from gdicons import *
By default, it will set its resources path to the one included in a default Steam installation. To override this, call this function:
set_resources_path(<path to Resources folder>)
To render an icon, call this function:
rendered_icon = render_icon(<parameter dictionary>)
This returns a PIL Image object, which can then be saved to a file.
Parameter Dictionary
Parameter name | Parameter description |
---|---|
"gamemode" |
The gamemode to render. Can be one of "cube" , "ship" , "ball" , "ufo" , "wave" , "robot" , "spider" , "swing" , or "jetpack" . |
"id" |
The ID of the gamemode to render. |
"primary" |
The primary color of the rendered icon. Can be a hexadecimal string ("#0b172b" ) or color string ("red" ). |
"secondary" |
The secondary color of the rendered icon. |
"glow" |
The glow color of the rendered icon. Can also be False to disable glow. |
"quality" |
The texture quality of the rendered icon. A higher quality leads to a higher size. Can be one of "low" /"normal" , "hd" , or "uhd" . |
Usage Example
from gdicons import *
viprin_cube = render_icon({
"gamemode": "cube",
"id": 133,
"primary": "#ffff00",
"secondary": "#b900ff",
"glow": "#b900ff",
"quality": "uhd"
})
nexus_spider = render_icon({
"gamemode": "spider",
"id": 13,
"primary": "#f00",
"secondary": "#fff",
"glow": "#fff",
"quality": "uhd"
})
viprin_cube.save("viprin.png")
nexus_spider.save("nexus.png")
Output
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gdicons-1.0.0.tar.gz
(42.1 kB
view details)
Built Distribution
gdicons-1.0.0-py3-none-any.whl
(30.0 kB
view details)
File details
Details for the file gdicons-1.0.0.tar.gz
.
File metadata
- Download URL: gdicons-1.0.0.tar.gz
- Upload date:
- Size: 42.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb0f2f94b3831169f95af95b34d68a5458a5d32ee5e36895ed4762dda022745b |
|
MD5 | a88291b333e641dc3682a9bdb10cb40d |
|
BLAKE2b-256 | 907ae5566b6bec8596b2782e912f2047891a5abf5719c1d113ea1a62815f81a3 |
File details
Details for the file gdicons-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: gdicons-1.0.0-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 869655f5988335b26efa325370970ec5d1ebc32ea59d1315bf99cbcfba133e1d |
|
MD5 | 9068a8d822a18e4bcc240897c71a5327 |
|
BLAKE2b-256 | 684a6c8d9dda2487a93deec33a1b59232361b8be407fbe9b099f0a5a05e4accb |