| Created | Updated | Code size | License |
|---|---|---|---|
| 2026-01 | 2026-09-26 | < 50 K | LGPL3 |
Converts any file to grayscale image.
No data is lost, that's byte-to-pixel conversion.
Lua executable as image:
Combined tool code as image:
Converts any file to image
Usage:
<image_format> <input_file> <output_file>
<image_format>: -- output image format. One of:
png -- (p)ortable (n)etwork (g)raphics
pgm -- (p)ortable (g)ray(m)ap
<input_file> -- input file name
<output_file> -- output file name
-- Martin, 2026-09
Reads given file and writes .png or .pgm image file.
Repository contains
- Compiled code in
deploy/ - Sample output in
extras/ - Complete source code in
src/ - Rebuild script and tools in
builder/
- Linux
- Lua 5.5 (5.4, 5.3) (
$ sudo apt install lua) pnmtopngtool to convert image to PNG ($ sudo apt install netpbm)
- Copy file
file_to_imgfromdeploy/.
-
Practical data file size is several megabytes
I've tested it on 30 MB file.
Tool value diminishes with data size. It is not designed to be fast or efficient for large files.
-
This is data exploration tool
You can grasp data structure from image. You can feel size relationships from two images.
-
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
meld-- my tool to combine Lua filesworkshop-- my personal Lua framework- My other projects

