Go Back!

bindot

[Source Code]

Insert binary data into bitmap images and extract binary data from bitmap images. Uses the rustic_bitmap image library.

Inserting data into an image.

bindot [-i|-e] [image] [data]

// So, for example, if you want to insert video.webm into image.bmp, you'd use

bindot -i image.bmp video.webm // This will write the final result to bindot_output.bmp

// If, in contrast, you want to extract hidden_data.webm from bindot_output.bmp, you'd use
bindot -e bindot_output.bmp hidden_data.webm // This will extract data from bindot_output.bmp and write it to hidden_data.webm

Explanation

The binary data is transformed into a bitmap image and embedded into another image, with each pixel spaced at regular intervals. The first four bytes of the pixel data indicate how many pixels contain hidden information. Using this value along with the image’s width and height, the step length can be determined, allowing the hidden data to be reconstructed and extracted.

The black rectangle represents an image with hidden data. The blue spot represents the first four bytes of pixel data, which is an unsigned 32-bit integer containing the number of pixels with hidden data. The red dots represent hidden data.
step_length = (width * height - 2) / number_of_pixels

An image with a hidden message.

The same hidden message as in the previous image, but inserted on a white canvas to see the inserted pixels more clearly.

The same white canvas with a hidden message, but some elements have been highlighted.