xbm
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

XBM Tools

GitHub Workflow StatusCodecov Coverage

This package contains functions for reading and writing XBM-formatted data. The package exports two main functions. The first of which is readXBM(data), which reads XBM-formatted data as a string, tries to parse it and returns a matrix of booleans where each entry represents a "pixel". The second function is generateXBM(name, grid), which takes a name for the variables in the output string and a two-dimensional matrix of boolean values and converts it into XBM-formatted data as a string. Refer to the documentation for more details.

Files in the XBM format are essentially little C header files containing image data stored in a numeric format, where each bit of these numbers represents a pixel. If you want to know more about XBM, please refer to this Wikipedia article. XBM is not particularly useful on computers anymore, but it is commonly used as an "image format" for tiny monochrome OLED displays in combination with Arduino microcontrollers.

To see this package in action, please refer to my Electron-based application XBM-Editor, which is a simple drawing program specifically geared towards working with XBM.

Readme

Keywords

Package Sidebar

Install

npm i xbm

Weekly Downloads

3

Version

1.2.4

License

BSD-2-Clause

Unpacked Size

15.9 kB

Total Files

9

Last publish

Collaborators

  • troeggla