Lucky Resistor's MicroPython Bitmap Tool Takes Your Images and Spits Out Ready-to-Use Code

The open source utility offers a point-and-click interface for image-to-code conversion, including some neat overlays for visualization.

Pseudonymous maker Lucky Resistor has released a software package designed to make it easier to handle bitmap imagery in MicroPython projects: the MicroPython BitMap Tool.

MicroPython's ability to handle image objects comes in handy when you're looking to add a user interface to your project, but actually getting the imagery in there can be a challenge. Lucky Resistor's solution: A software tool which takes a range of bitmap image formats and converts them to code which can be pasted directly into a MicroPython project ready for use.

The tool can load PNG, JPEG, GIF, PBM, PGM, PPM, XBM, and XPM graphics, though a typo prevents the current release from loading BMP format images. Once loaded the software converts the image to a frame buffer in VLSB, HSMB, or HLSB format, while a visual overlay offers a glimpse at how the image has been interpreted.

The initial release of the MicroPython Bitmap Tool is a framework, with more features to follow. (📹: Lucky Resistor)

The software's focus, however, is on smaller images: If any dimension of the source image exceeds 256 pixels, the MicroPython Bitmap Tool will refuse to convert it - though it wouldn't be impossible to add a resizing step to the import in a future release to work around the limitation. It also only supports monochrome images, but is likely to be expanded in the future: "This first version is just a start," Lucky Resistor explains, "creating a framework where I can add additional converters."

The source code for the project, written in C++, is available on GitHub under the GNU General Public License 3; pre-compiled binaries for Windows and macOS can be found on the Lucky Resistor website.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Get our weekly newsletter when you join Hackster.
Latest articles
Read more
Related articles