Skip to main content

Image to cpp

Convert an image into a c++ header file containing a bytes array. Useful for electronic projects using a thermal printer or a LCD display.

Usage

> image-to-cpp --help
usage: main.py [-h] [-r RESIZE] [-s] [-o OUTPUT] [-v] [-d] [-t THRESHOLD] image_path

Convert an image into a byte array c++ code.

positional arguments:
  image_path            Path of image to convert, use `--` to read from stdin.

optional arguments:
  -h, --help            show this help message and exit
  -r RESIZE, --resize RESIZE
                        Resize image to specified width, keeping aspect ratio.
  -s, --show            Only show converted image.
  -o OUTPUT, --output OUTPUT
                        Store to specified file (default: image_name.h), use `--` to output on stdout.
  -v, --verbose         Deactivate information messages.
  -d, --dither          Activate dithering.
  -t THRESHOLD, --threshold THRESHOLD
                        Threshold level when converting to black and white, from 0 to 255 (default: 128).

License

MIT

Metadata

Release files for image-to-cpp 0.1.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 image-to-cpp 0.1.0
File Size Uploaded Provenance Actions
image-to-cpp-0.1.0.tar.gz 4.1 kB Without provenance Details for image-to-cpp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for image-to-cpp 0.1.0
File Interpreter ABI Platform Actions
image_to_cpp-0.1.0-py3-none-any.whl Python 3 none any Details for image_to_cpp-0.1.0-py3-none-any.whl

Total release size: 8.7 kB

Release files / image-to-cpp-0.1.0.tar.gz

Download URL image-to-cpp-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a84eeb8c0d68a3b946c88ec153c17d14b33e31e6ee8cc428913986925986a3bd
BLAKE2b-256 checksum
How to use checksums
145f6ed2c449f2d7745e0bf908c8a9d34deb9ca761f2b28041dbaaac1a05a8cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.7 Linux/5.13.0-51-generic

Release files / image_to_cpp-0.1.0-py3-none-any.whl

Download URL image_to_cpp-0.1.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42f9fd7b6b31516269f3e2fe6051f7fd8fc8f2f5a8b6d641ff0114ed9a111dc2
BLAKE2b-256 checksum
How to use checksums
cefa3af5a27208494f7c33190e1c4f7253d45d7b41e7e4e2b0fc92cb13c3cc4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.7 Linux/5.13.0-51-generic

Security for image-to-cpp 0.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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