Skip to main content

Pyxreser

Pyxreser is a small Python library designed to simplify the creation of Pyxel image by converting 256x256 pixel 16-color PNG or JPG images into .pyxres files.

Why?

This library was born out of frustration with the inconvenient use of Pyxel's built-in editor and aims to provide a simpler alternative for generating custom images for your games. It's mainly a personal desire to easily create a tile map using image software such as Microsoft Paint or pixel-editing software such as PyxelEdit, PixelEditor which makes my life a lot easier when creating games. If you're on this page, you're probably looking for a solution to do just that, and I think pyxreser is it.

Features

  • Converts 16-color 256-pixel PNG or JPG images into Pyxel image.

Installation

pip install pyxreser

Usage

To use Pyxreser, you can run the following command in your terminal:

pyxreser image [-h | --help] [TYPE] [N | -n N] [IMAGE | -i IMAGE | --image IMAGE] [OUTPUT | -o OUTPUT | --output OUTPUT] [-v | --version]

Optional options :
  -h, --help Displays this help message and quits
  -v, --version Displays Pyxreser version
  OUTPUT: Pyxres output path and .pyxres file name (default: input image name without extension)

Arguments :
  TYPE, there is only the "image" type for the moment. (future versions will include "tilemap", "sound", "music")
  N, image number (1-3) (default: 1)
  IMAGE, Image input path, 

It's important to note that the provided image must adhere to the following criteria:

  • It must contain exactly 16 different colors.
  • Its size must be 256x256 pixels.

If a .pyxres file already exists at the specified location, Pyxreser will modify it by replacing the existing image with the new one.

If your image does not contain the same default colors on Pyxel, Pyxreser will automatically generate or replace a .pyxpal file in addition to your .pyxres file.

Example

pyxreser image 0 picture.png resource.pyxres

Future Features Checklist

  • Image Conversion: Convert tilemap files into Pyxel-compatible tilemap.
  • Sound Conversion from MP3: Convert MP3 audio files for integration into games.
  • Music Conversion from MP3: Convert MP3 music files into Pyxel-compatible audio formats.

Metadata

Release files for pyxreser 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyxreser 1.0.0
File Size Uploaded
pyxreser-1.0.0.tar.gz 5.4 kB Details

Release files / pyxreser-1.0.0.tar.gz

Download URL pyxreser-1.0.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
88cff4d5424b1b8489300d32fd9ec48d1c31564cd35d352c9925b046d44b15a8
BLAKE2b-256 checksum
How to use checksums
132b33531337858ec8ccb8accd4be2f08d02acfdcac02e1520f96d6be073deb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.9

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page