# Pyxreser
**Pyxreser** is a small Python library designed to simplify the creation of **[Pyxel](https://github.com/kitao/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](https://www.microsoft.com/windows/paint) or pixel-editing software such as [PyxelEdit](https://pyxeledit.com/), [PixelEditor](https://pixieditor.net) 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
```bash
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/afi-dev/pyxreser",
"name": "pyxreser",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.0",
"maintainer_email": "",
"keywords": "python pyxel pyxreser pyxres image converter color png jpg",
"author": "afi-dev",
"author_email": "aconique@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/13/2b/33531337858ec8ccb8accd4be2f08d02acfdcac02e1520f96d6be073deb5/pyxreser-1.0.0.tar.gz",
"platform": null,
"description": "# Pyxreser\r\n**Pyxreser** is a small Python library designed to simplify the creation of **[Pyxel](https://github.com/kitao/pyxel)** image by converting 256x256 pixel 16-color PNG or JPG images into **.pyxres** files.\r\n\r\n## Why? \r\nThis 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](https://www.microsoft.com/windows/paint) or pixel-editing software such as [PyxelEdit](https://pyxeledit.com/), [PixelEditor](https://pixieditor.net) 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.\r\n\r\n## Features\r\n\r\n- Converts 16-color 256-pixel PNG or JPG images into Pyxel image.\r\n\r\n## Installation\r\n\r\n```bash\r\npip install pyxreser\r\n```\r\n\r\n## Usage\r\n\r\nTo use Pyxreser, you can run the following command in your terminal:\r\n\r\n```\r\npyxreser image [-h | --help] [TYPE] [N | -n N] [IMAGE | -i IMAGE | --image IMAGE] [OUTPUT | -o OUTPUT | --output OUTPUT] [-v | --version]\r\n\r\nOptional options :\r\n -h, --help Displays this help message and quits\r\n -v, --version Displays Pyxreser version\r\n OUTPUT: Pyxres output path and .pyxres file name (default: input image name without extension)\r\n\r\nArguments :\r\n TYPE, there is only the \"image\" type for the moment. (future versions will include \"tilemap\", \"sound\", \"music\")\r\n N, image number (1-3) (default: 1)\r\n IMAGE, Image input path, \r\n\r\n```\r\n\r\nIt's important to note that the provided image must adhere to the following criteria:\r\n\r\n- It must contain exactly 16 different colors.\r\n- Its size must be 256x256 pixels.\r\n\r\nIf a .pyxres file already exists at the specified location, Pyxreser will modify it by replacing the existing image with the new one.\r\n\r\nIf 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.\r\n\r\n### Example\r\n\r\n```\r\npyxreser image 0 picture.png resource.pyxres\r\n```\r\n\r\n## Future Features Checklist\r\n\r\n- [ ] Image Conversion: Convert tilemap files into Pyxel-compatible tilemap.\r\n- [ ] Sound Conversion from MP3: Convert MP3 audio files for integration into games.\r\n- [ ] Music Conversion from MP3: Convert MP3 music files into Pyxel-compatible audio formats.\r\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "pyxreser is a small Python library designed to simplify the creation of Pyxel images by converting 256x256 pixel 15-color PNG or JPG images into .pyxres files.",
"version": "1.0.0",
"project_urls": {
"Bug Reports": "https://github.com/afi-dev/pyxreser/issues",
"Buy me a coffee": "https://www.buymeacoffee.com/afidev",
"Changelog": "https://github.com/afi-dev/pyxreser/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/afi-dev/pyxreser/blob/main/README.md",
"Feature request": "https://github.com/afi-dev/pyxreser/issues",
"Homepage": "https://github.com/afi-dev/pyxreser",
"Ko-fi": "https://ko-fi.com/afidev",
"Source": "https://github.com/afi-dev/pyxreser"
},
"split_keywords": [
"python",
"pyxel",
"pyxreser",
"pyxres",
"image",
"converter",
"color",
"png",
"jpg"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "132b33531337858ec8ccb8accd4be2f08d02acfdcac02e1520f96d6be073deb5",
"md5": "b52948a08a72bea7eba9d397c39c8f7e",
"sha256": "88cff4d5424b1b8489300d32fd9ec48d1c31564cd35d352c9925b046d44b15a8"
},
"downloads": -1,
"filename": "pyxreser-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "b52948a08a72bea7eba9d397c39c8f7e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.0",
"size": 5361,
"upload_time": "2024-02-21T01:54:12",
"upload_time_iso_8601": "2024-02-21T01:54:12.428866Z",
"url": "https://files.pythonhosted.org/packages/13/2b/33531337858ec8ccb8accd4be2f08d02acfdcac02e1520f96d6be073deb5/pyxreser-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-21 01:54:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "afi-dev",
"github_project": "pyxreser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "pyxreser"
}