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.
This is a toy project, still want to try it out?
$ go install github.com/miku/binpic/cmd/binpic@latest