Skip to content

Latest commit

 

History

44 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepWiki (sometimes AI explains it better)

What

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:

Lua executable

Combined tool code as image:

Tool executable

Usage

$ 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.

Requirements

  • Bash (use Linux)
  • Lua 5.3 (5.4, 5.5) ($ sudo apt install lua)
  • pnmtopng tool to convert image to PNG ($ sudo apt install netpbm)

Install/remove

Notes

  • 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.

Details

  • 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.sh creates combined and compiled Lua file in deploy/. It uses my meld tool for that

    You can use it to recompile to another Lua version. But you'll need full workshop repo near current date (2026-06-01) to recompile.

See also

About

Converts any binary file to grayscale image

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages