Simple C program to visualize binary files as 2D images. Two pair of bytes are read from the file and adds to the brightness of the pixel with thoose coordinates. The resulting image is saved as a png. Can also read images using stb_image and then iterates over the uncompressed pixel data to visualize it.
Brightness is calculated as the logorithm of the number of times a pair of bytes occurs, normailized to the range of 0-255.
Written in C23, tested on Windows 11 with gcc.
gcc main.c ./lib/fcu_windows.c -std=c23 ./a input_fileResult is saved to result.png in the same directory, if the file is an recognized image format, the result of the uncompressed pixel data is also saved to raw image visualization.png.
main.c visualized
lib/stb_image.h visualized
a.exe visualized
The openttd.exe executable from the x64 version and arm64 version (Windows, OpenTTD version 15.2).
x64 version:
arm64 version:
Original image:
Binary visualization:
Pixel data visualization:
Original image:
Binary visualization:
Pixel data visualization:
Image:
Pixel data visualization:
Jpg binary visualization:
Avif binary visualization:














