Skip to main content

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.

ardu-imconvert

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-imconvert or python -m arduimconvert (if installed from PyPI).
  • as a CLI application, with options (see below).

Features

  • Real-time data visualization.
  • Supports .png and .gif image 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::drawBitmap
    • Arduboy2::drawCompressed
    • Sprites::drawExternalMask
    • Sprites::drawOverwrite
    • Sprites::drawErase
    • Sprites::drawSelfMasked
    • ArdBitmap::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 Slice function to split your image into tiles (useful for tilemaps) or sprite frames.
  • Export exports the current image using the selected format, creating a C/C++ header file next to the source image.
  • Export Selected exports all selected images from the directory browser.
  • Export All exports all images from the directory browser.
  • Export As exports 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

License

GPLv3

Release files for ardu-imconvert 2.0.3

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

Source distribution (sdist)

Source distribution for ardu-imconvert 2.0.3
File Size Uploaded
ardu_imconvert-2.0.3.tar.gz 28.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ardu-imconvert 2.0.3
File Interpreter ABI Platform
ardu_imconvert-2.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 56.4 kB

Release files / ardu_imconvert-2.0.3.tar.gz

Download URL ardu_imconvert-2.0.3.tar.gz
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b63e6da181d27b55be44375c35e17ffef7f33887af0cf186819a31e90cbe1d74
BLAKE2b-256 checksum
How to use checksums
e6c3d524d99bc4926a88f7f2c7c5f57cf8e1898a5bdd4389712aaaa2f52820ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / ardu_imconvert-2.0.3-py3-none-any.whl

Download URL ardu_imconvert-2.0.3-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
441d81060eb1c36d7c77e46d3fc135b530fd4b57678b4e532efdd887a82d5a13
BLAKE2b-256 checksum
How to use checksums
604f25c5b0391cf0b93481d33b7878f97379b25119ac8247ceb3a3e6d97e8898
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

2.0.3 This release

2 release files

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