Skip to content

miku/binpic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

binpic

Create a PNG from any file. Pitched by c3er at devopenspace 2018, see also bin2img.

$ binpic /bin/ls

Encode a file as grayscale or colored image, optionally resize.

$ binpic -h
Usage of binpic:
  -color
        produce an image with colored pixels
  -d    decode a binpic-ed png (XXX: not yet implemented)
  -o string
        output file, will be a PNG (default "output.png")
  -resize string
        resize, if set (default "0x0")
  -version
        show version

Take care to put the options before the file to decode.

Thanks to the beautiful Go standard library packages like image and io, this is little more complex than a Hello World. This simple image library helps, too.

Install

This is a toy project, still want to try it out?

$ go install github.com/miku/binpic/cmd/binpic@latest

Gallery

binpic binary (amd64)

binpic binary (arm)

ls (coreutils)

The go tool

Caffe model file

Protocol Buffer

mp4

webm

XML

LevelDB file

PDF

MARC21

wav

d64