(sometimes AI explains it better)
| Created | Updated | Code size | License |
|---|---|---|---|
| 2026-01 | 2026-08 | < 50 K | LGPL3 |
Converts any binary file to grayscale PNG image.
No data is lost, that's byte-to-pixel conversion.
Lua executable as image:
Combined tool code as image:
$ bin_to_png.sh <input_file>
Reads given file and writes PNG image to current directory.
Creates file with name of original name and .png extension.
This Bash wrapper calls Lua file to create image in .ppm
format and then converts it to .png using pnmtopng tool.
- Bash (use Linux)
- Lua 5.3 (5.4, 5.5) (
$ sudo apt install lua) pnmtopngtool to convert image to PNG ($ sudo apt install netpbm)
- Copy files from
deploy/
-
Practical data file size is several megabytes
I've tested it on 32 MB file.
-
This is data exploration tool
You can grasp data structure from image. You can feel size relationships from two images.
Tool value diminishes with data size. It is not designed to be fast or efficient for large files.
-
Implementation uses spiral filling
For spiral filling I wrote "ant" class and coded spiral movement for that ant.
-
Feel free to experiment with another filling algorithms
-
build.shcreates combined and compiled Lua file indeploy/. It uses mymeldtool for thatYou can use it to recompile to another Lua version. But you'll need full
workshoprepo near current date (2026-06-01) to recompile.
- Netpbm codec -- codec's repo
meld-- my tool to combine Lua filesworkshop-- my personal Lua framework- My other projects

