Converts images to GameBoy tiles
BSD-3-CLAUSE License
|GitHub| |Lint and Tests| |PYPI Version| |License| |Discord| |Black|
img2gb generates GameBoy Tilesets and Tilemaps from standard image (PNG,
JPEG,...). It converts the images into the GameBoy image format and
generates C code (``.c`` and ``.h`` files) that can be used in GameBoy
projects.
.. image:: ./doc/_static/banner.png
Setup
To work on img2gb first create a virtualenv::
python3 -m venv __env__
and activate it::
source __env__/bin/activate
Then install the project with all dev dependencies::
pip install -e .[dev]
Commands
You can lint the code and check coding style with::
nox -s lint
You can fix coding style using Black with::
nox -s black_fix
You can run test on all supported Python versions or on a specific Python version with::
nox -s test # Run on all Python version
nox -s test-3.8 # Run on Python 3.8
nox -s test-3.9 # Run on Python 3.9
nox -s test-3.10 # Run on Python 3.10
nox -s test-3.11 # Run on Python 3.11
nox -s test-3.12 # Run on Python 3.12
And you can build the documentation with (result in build/html/
)::
nox -s gendoc
Want to support this project?
☕️ Buy me a coffee <https://www.buymeacoffee.com/flozz>
__💵️ Give me a tip on PayPal <https://www.paypal.me/0xflozz>
__❤️ Sponsor me on GitHub <https://github.com/sponsors/flozz>
__[NEXT] (changes on master
, but not released yet):
v1.2.0:
v1.1.0:
offset
option (#2)v1.0.0:
v0.10.0: Adds non-RGB image support (indexed images,...)
v0.9.1: Fixes an issue with Python 3
v0.9.0: Initial release (generates tiles, tilesets and tilemaps)
.. |GitHub| image:: https://img.shields.io/github/stars/flozz/img2gb?label=GitHub&logo=github :target: https://github.com/flozz/img2gb
.. |Lint and Tests| image:: https://github.com/flozz/img2gb/actions/workflows/python-ci.yml/badge.svg :target: https://github.com/flozz/img2gb/actions
.. |PYPI Version| image:: https://img.shields.io/pypi/v/img2gb.svg :target: https://pypi.python.org/pypi/img2gb
.. |License| image:: https://img.shields.io/pypi/l/img2gb.svg :target: https://github.com/flozz/img2gb/blob/master/LICENSE
.. |Discord| image:: https://img.shields.io/badge/chat-Discord-8c9eff?logo=discord&logoColor=ffffff :target: https://discord.gg/P77sWhuSs4
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://black.readthedocs.io/en/stable