Skip to content

jmhobbs/one-bitmap-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

1-bit Bitmap Tools

These are some tools for working with 1-bit bitmaps.

All files are raw bytes, no metadata is included. Think PBM but even less.

A 1 is white, a 0 is black.

convert

usage: convert <input> <output>

Convert a PNG to 1-bit format. Alpha is discarded.

$ convert demo.png demo.1bpp
Image bounds:  (0,0)-(16,4)
$ hexyl demo.1bpp
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 55 00 aa ff ff aa 00 55 ┊                         │U⋄××××⋄U┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘
$

print

usage: print <file> <width> <height>

Prints a bitmap to the console using box drawing characters.

Demo Image

$ print demo.1bpp 16 4
┏━━━━━━━━━━━━━━━━┓
┃ █ █ █ █        ┃
┃█ █ █ █ ████████┃
┃█████████ █ █ █ ┃
┃         █ █ █ █┃
┗━━━━━━━━━━━━━━━━┛
$

About

Tools for working with no-metadata 1-bit per pixel images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages