Cabinvis is a small
web application that allows you to render the contents of files as images. You
can use this to interpret raw image data, or to simply make a 'birds-eye'
observation of patterns in the contents of a file.
Inspired by Aldo Cortesi's blog post
binaries with space-filling curves, I decided to create a utility that would
allow me to do this, on the convenient platform that is the web.
It uses canvas for the image output, web workers for processing, the FileReader
interface to access files, and the BlobBuilder interface to include the worker
script inside the same file as everything else. It is currently tested and
supported in Firefox and Chrome. If you want to use it on Chrome locally, you
must disable the same-origin policy with
The bulk of the code is divided between 'consumers' and 'producers', which are
objects with their own internal state. When rendering the image, the chosen
consumer reads bytes in, and when a pixel is ready, sends it to the chosen
producer, which draws the pixel onto the canvas in some specified arrangement.
Here are some examples:
This program is released under the terms of the MIT license. Please send any
questions, suggestions or comments to