⭐ GitHub Repo

Convert Images to Hex Code

This project provides a set of Python tools to convert images into hexadecimal arrays for use with microcontrollers (e.g., ESP32/Arduino) β€” especially for E-Ink displays.

✨ Features

Image β†’ Hex Conversion

Hex β†’ Image Conversion

Verify hex array validity by converting back into an image.

Image β†’ Bitmap (.bmp)

Convert images into standard .bmp format for further processing.

Centering Tool

Center a .png or image on a canvas. Fills borders with 5 shades (black, white, and 3 gray levels).

πŸš€ Usage

Clone the repo:

git clone https://github.com/mihirvr/image_to_hex.git

Install dependencies:

pip install -r requirements.txt

Run a script:

python hexgen_w_dithering.py

Check outputs in respective folders.

πŸ“Œ Notes

Designed for E-Ink display testing (works with ESP32/Arduino projects). Supports monochrome + grayscale (with and without dithering).

Easy preview to ensure the generated hex data is valid.