Skip to main content

Converts images to GameBoy tileset

Project description

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.

./doc/_static/banner.png

Dependencies

  • Python >= 3.8

  • Pillow >= 5.0

Install

Usage

Hacking

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

Support this project

Want to support this project?

Changelog

  • [NEXT] (changes on master, but not released yet):

    • Nothing yet ;)

  • v1.2.0:

    • fix: Fixed wrong version displayed (@flozz, #3)

    • chore: Added Python 3.11 and 3.12 support

    • chore!: Removed Python 2.7 and 3.7 support

  • v1.1.0:

    • Removes arbitrary size limit for tilmaps

    • Implements offset option (#2)

  • v1.0.0:

    • Refacto of the Python API, with new high-level fuction to be easier to use

    • Refacto of the CLI: now tileset and tilemap are generated separately, this allow more options for both and covers more usecases.

    • New option to handle alternative palette

    • New option to handle 8x16px sprites

    • Documentation

    • Unit test (everything is not coverd but it is better than nothing :))

  • 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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

img2gb-1.2.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

img2gb-1.2.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file img2gb-1.2.0.tar.gz.

File metadata

  • Download URL: img2gb-1.2.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for img2gb-1.2.0.tar.gz
Algorithm Hash digest
SHA256 cb04a5331d49d3bfb0c5ff9d8b4e5ce6bfcd50315f1b57372e56861c79f26fb8
MD5 1616f5346c8240ef5bd3117a71a997ba
BLAKE2b-256 a36f36cf1a7ab40baeec50a4cd5e0bb1b2ac86013a606360de29ea230a054795

See more details on using hashes here.

File details

Details for the file img2gb-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: img2gb-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for img2gb-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13c0467fa13e6e8f245710cef06d6d852636babc123331c00f1e038297e6fcc8
MD5 4945e654f0bddab4a5d8b0d2ffdc79c4
BLAKE2b-256 4b3ac055502325eac0ef0347564757eb7b69331e67bd64d4c864e9b47970ec9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page