1.0.1 • Published 6 years ago

pixelhex v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

PixelHex

A tool to convert jpg, png or bmp to hex byte array for 32x16 PixelDisplay.

Installation

$ sudo npm i -g pixelhex

Usage

$ pixelhex <image path> [gamma correction] [row size]
ParameterDescription
image pathpath to image to convert to hex bytesRequired
gamma correctionwhether to perform gamma correctionOptional (default: true)
row sizenumber of bytes to output in a rowOptional (default: 8)

Example

$ pixelhex image.bmp
0x70,	0x00,	0x10,	0x00,	0x20,	0x20,	0x20,	0x20,
0x00,	0x40,	0x00,	0x40,	0x40,	0x00,	0x00,	0x00,
...
0x00,	0x40,	0x00,	0x40,	0x40,	0x00,	0x00,	0x00,
0x00,	0x00,	0x40,	0x00,	0x00,	0x00,	0x20,	0x00
$

The output is meant to be copied to clipboard, and the recommended way is to pipe the command with xclip.

$ pixelhex image.bmp | xclip
1.0.1

6 years ago

1.0.0

6 years ago