Image converter for Arduboy with real-time preview and multiple output formats
Project description
ardu-imconvert
A simple image converter for Arduboy which focuses on real-time display and formatting of converted data.
This is a Python rewrite of the original C++ version, using PySide6.
Fast start
install it:
- from PyPI (requires Python >= 3.12):
pip install ardu-imconvert. - download an executable from releases page (Windows and Linux only).
then run it:
- as a GUI application, directly without option:
ardu-imconvertorpython -m arduimconvert(if installed from PyPI). - as a CLI application, with options (see below).
Features
- Real-time data visualization.
- Supports
.pngand.gifimage formats. - Preview function.
- Animation playback.
- Simple raw data format display.
- Extracts mask data from alpha channel.
- Single or multiple source file export (C/C++ header format).
- Support for RLE Cabi compression mode (compatible with
Arduboy2::drawCompressed). - Support for ArdBitmap compression mode (compatible with ArdBitmap library).
- Simple assets directory browser (fast switching between images in the same directory).
- Format data for multiple drawing functions:
Arduboy2::drawBitmapArduboy2::drawCompressedSprites::drawExternalMaskSprites::drawOverwriteSprites::drawEraseSprites::drawSelfMaskedArdBitmap::drawCompressed
- Basic image operations:
- Negative (invert black and white)
- Slice tiling
- CLI mode for scripted/batch conversions.
How to use (GUI)
- Use the mouse wheel to zoom in/out and drag to pan the image in the preview.
- Change format to display ready-to-use converted data for a specific drawing function.
- Use the
Slicefunction to split your image into tiles (useful for tilemaps) or sprite frames. Exportexports the current image using the selected format, creating a C/C++ header file next to the source image.Export Selectedexports all selected images from the directory browser.Export Allexports all images from the directory browser.Export Asexports one or multiple images into a single C/C++ header file.
How to use (CLI)
When called with arguments, ardu-imconvert runs in CLI mode. By default it generates a complete C/C++ header file to stdout.
For example:
ardu-imconvert image.png # output full .h to stdout
ardu-imconvert image.png --output sprite.h # write to file
ardu-imconvert image.png -f Sprites_drawOverwrite # use a specific format
ardu-imconvert image.png --data # output only the data array
ardu-imconvert image.png --mask # output only the mask array
ardu-imconvert tilemap.png --slice 8x8 # slice into 8x8 tiles
ardu-imconvert image.png --negative # invert image before conversion
| Option | Description |
|---|---|
-f, --format |
Output format: Default, RLECabi, Arduboy2_drawBitmap, Arduboy2_drawCompressed, Sprites_drawExternalMask, Sprites_drawOverwrite, Sprites_drawErase, Sprites_drawSelfMasked, ArdBitmap_drawCompressed |
--data |
Output only the data array (mutually exclusive with --mask) |
--mask |
Output only the mask array (mutually exclusive with --data) |
--output FILE |
Write output to a file instead of stdout |
--slice WxH |
Slice the image into tiles of WxH pixels (e.g. 8x8) |
--negative |
Invert the image before conversion |
--version |
Show version and exit |
Development
git clone https://gitlab.com/zeduckmaster/ardu-imconvert-v2.git
cd ardu-imconvert-v2
pip install -e .[dev]
python -m pytest # run tests
python -m arduimconvert # run the GUI from source
Related Links
- Arduboy2 library: https://github.com/MLXXXp/Arduboy2
- ArdBitmap library: https://github.com/igvina/ArdBitmap
- Icon used: http://www.visualpharm.com/
License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ardu_imconvert-2.0.3.tar.gz.
File metadata
- Download URL: ardu_imconvert-2.0.3.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b63e6da181d27b55be44375c35e17ffef7f33887af0cf186819a31e90cbe1d74
|
|
| MD5 |
4f6c8c02cde7afce336a9d2b22955742
|
|
| BLAKE2b-256 |
e6c3d524d99bc4926a88f7f2c7c5f57cf8e1898a5bdd4389712aaaa2f52820ec
|
File details
Details for the file ardu_imconvert-2.0.3-py3-none-any.whl.
File metadata
- Download URL: ardu_imconvert-2.0.3-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
441d81060eb1c36d7c77e46d3fc135b530fd4b57678b4e532efdd887a82d5a13
|
|
| MD5 |
0e6f284c84e6b1efc44f1cab6dac5371
|
|
| BLAKE2b-256 |
604f25c5b0391cf0b93481d33b7878f97379b25119ac8247ceb3a3e6d97e8898
|