Fiction one: Converting the image-data to one number

In digital imaging the numerical data to be graphically interpreted is stored in a one dimensional chain, while the rendered (interpreted) image is two dimensional by its very nature, so a conversion between the dimensions is necessary. The traditional "solution" for this problem is to "map" the first number of the data chain to the topleft pixel of the image, and the last one to the right-bottom. Let's examine how it is practically possible to treat the numerical data-chain describing an image as one long number instead of this usual method.

To make our approach easily understandable let's examine the case of a tiny (3x3 pixels) black and wite (1 bit color depth) digital, on which a diagonal line is pictured.

Figure 3. The conversion of a 3x3 pixels 1 bit color depth image to a number

Only black and white pixels are used in the image, so the colors of the pixels can be easily described by using one binary digit: 0 means white, and 1 means black in our case.

If we convert the 2 dimensional number-matrix to one dimension we get the binary number 001010100. Using the table with the binary place-values, we can count the decimal value of the number: 1x64 plus 1x16 plus 1x4 = eightyfour.

The digital canvas determines the maximum number of images picturable on it. By treating the pixels as digits of one long number we can easily count the number of variations, and render each one. The 3x3 pixels sized black and white image above can be described by 9 binary digits: we can picture images from 000000000 (decimal 0) to 111111111 (decimal 511): all together 512 combinations are possible. Besides counting the maximum number of variations, we can easily picture each of them by counting from 0 to 512 and converting the numbers to images.

See all the pictures together which are renderable on a 3x3 1bit digital canvas

The number of variations will exponentially grow if we increase the color depth and/or the resolution, but our method will remain easily implementable: it will only take longer to picture each variations.

Although every digital image can be converted to one and only one number, it is interesting to consider that the same process is not so strict backwards: the same number can be pictured on various canvases with different aspect ratio. From the viewpoint of converting numerical data to an image, only the product given by the number of pixels multiplied by the color depth is constant. For example a 6 digit binary number can be pictured on different sized 1 bit images which contain 6 pixels: we could use either 1x6, 6x1, 3x2, 2x3 resolution canvases.

See some ways of converting numbers to pictures using different 1bit digital canvases

Any number can be converted to at least one picture - usually more, except for the number 1 and the prime numbers. The more multiplication of interger-pairs will result the number, the more resolutions can be used to picture it.