adot-image-creator
Convert images to packed monochrome C arrays for dot-matrix displays, with an optional interactive bitmap editor.
Features
- Load common bitmap formats (PNG, JPG, BMP, ...) as grayscale
- Optional SVG support via
cairosvg(extra dependency) - Automatically scale and center image into target width/height
- Convert image to monochrome bytes optimized for dot-matrix displays (8-pixel pages)
- Optional interactive editor (Tkinter GUI) to fine-tune individual pixels
- Generate C-style hexadecimal dump including width/height header
Installation
From PyPI
Once published, you will be able to install the package via:
pip install adot-image-creator
To enable SVG input support, install with the svg extra:
pip install "adot-image-creator[svg]"
Command-line usage
The package exposes a console script named adot-image-creator.
adot-image-creator -i INPUT -H HEIGHT -w WIDTH [options]
Arguments:
-i, --input– input image file (PNG, JPG, SVG, BMP, ...), required-H, --height– target height in pixels (1–255), required-w, --width– target width in pixels (1–255), required-t, --threshold– threshold level between white and black (0–10, default: 5)-s, --scale– pixel scale for interactive editor (logical pixel = s × s screen pixels, default: 4)
Example:
adot-image-creator \
-i logo.png \
-H 32 \
-w 64 \
-t 5 \
-s 4
The tool will:
- Load and resize the image to fit into the specified width/height.
- Convert it to monochrome using the given threshold.
- Optionally open a Tkinter-based editor where you can flip individual pixels.
- Show a preview of the resulting bitmap.
- Print a C-style hex dump to standard output, including height and width bytes.
You can redirect the output directly into a C source file, for example:
adot-image-creator -i logo.png -H 32 -w 64 > logo_bitmap.c
Library usage
The same functionality is available from Python code via the adot_image_creator package.
from adot_image_creator import (
load_image,
to_monochrome_bytes,
bytes_to_bool_matrix,
bool_matrix_to_bytes,
interactive_edit_bitmap,
preview_from_bytes,
format_hexdump,
)
# Load and prepare an image
img = load_image("logo.png", width=64, height=32)
# Convert to monochrome bytes (0–10 threshold)
raw_bytes = to_monochrome_bytes(img, threshold_level=5)
# Optionally let the user tweak pixels in a small GUI editor
bitmap = bytes_to_bool_matrix(width=64, height=32, data=raw_bytes)
edited_bitmap = interactive_edit_bitmap(width=64, height=32, bitmap=bitmap, scale=4)
final_bytes = bool_matrix_to_bytes(width=64, height=32, bitmap=edited_bitmap)
# Preview result in a simple image viewer
preview_from_bytes(width=64, height=32, data=final_bytes)
# Generate C hex dump
hexdump = format_hexdump(height=32, width=64, data=final_bytes)
print(hexdump)
Dependencies
Pillow– required for image loading and processingcairosvg– optional, required only when working with SVG/SVGZ input ([svg]extra)tkinter– optional, used only for the interactive bitmap editor (may not be available in some environments)
License
This project is distributed under a proprietary license.
Metadata
Release files for adot-image-creator 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| adot_image_creator-3.1.0.tar.gz | 5.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adot_image_creator-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 kB
Release files / adot_image_creator-3.1.0.tar.gz
| Download URL | adot_image_creator-3.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e04b6996ef3a99bb62b1720f0644d0938e445e0a04e181ac20f08c8a54d06675
|
|
BLAKE2b-256 checksum How to use checksums |
917cbcc2413f198f496895521110ad637aebc38e39accf3970131e9c4fbbf8b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / adot_image_creator-3.1.0-py3-none-any.whl
| Download URL | adot_image_creator-3.1.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ca119c203c4bd5f14d660851f634f6a5006ab6725d2c63e0e967641cc9811f8
|
|
BLAKE2b-256 checksum How to use checksums |
86666f81cc80aa53f86044ccd421fcb2037879bf961d3aaabf815361ad3653b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for adot-image-creator 3.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.