Skip to content

eroldmrclk/text-binary-file-to-image

Repository files navigation

VisualProgramming

I developed an interface that we can choose a file. It decides what format the selected file is and provides the necessary solution.

Interface Screenshot

MainFrame

File Types

It is a program that reads data encrypted in 6 different ways and uses these data to produce an photo with animations. Let's explain these different data named p1, p2, p3, p4, p5, p6 in more detail below.

P1

The P1 type consists of 0 and 1 data and using them as contrasting colors, we arrange each value to show one pixel to obtain a black and white image.

Sample Screenshot

Circle-p1

P2

The P2 type consists of data between 0-255 and we arrange each value to show one pixel to obtain an RGB color image.

Sample Screenshot

Mountain-p2

P3

The P3 type consists of data between 0-255 and we arrange 3 values to show one pixel to obtain an RGB color image.

Sample Screenshot

Blackbuck-p3

P4

The P4 data type is binary data. We need to read the data in this file as bytes. We also need to separate the excess from the data we receive here. Actually, this data type is like the binary format of P1. For this reason, the result will be a black and white image again.

Sample Screenshot

Fool-p4

P5

The P5 data type is binary data. We need to read the data in this file as bytes. Actually, this data type is like the binary format of P2. For this reason, the result will be a RGB color image again.

Sample Screenshot

Baboon-p5

P6

The P6 data type is binary data. We need to read the data in this file as bytes. Actually, this data type is like the binary format of P3. For this reason, we arrange 3 binary values to show one pixel to obtain an RGB color image.

Sample Screenshot

Tree-p6

Links to different files you can try.

Index of /~jburkardt/data/pbmb
PGMB Files Binary Portable Gray Map Graphics Files
PGMA Files ASCII PGM Files (Portable Gray Map)