Tool to convert an image into numbers 0,1,2,3,…,8,9 or even 255 from a grayscale palette to digitize the image.
Image in Numbers - dCode
Tag(s) : Image Processing
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
In computers, the images are encoded with numbers, themselves stored in binary depending on the image format used.
However, it is possible to store the images in the form of an array of numbers, the first number (or figure) of the first line indicating the value of the first pixel of the image, and so on.
By storing the numbers to 1 digit, it is possible to have an array similar to ASCII art representing the image.
Upload the image, indicate the number of digits, and click on convert.
The image will be converted to grayscale (shades of black and white) and each pixel in the image will be read and converted from 0 to N depending on its grayscale (0 = black by default).
Example: Bowl
000011111222222111110000
000111122222222221111000
001111222222222222111100
011112222233332222211110
011122223333333322221110
011122233333333332221110
111222233344443332222111
111222333444444333222111
111222333444444333222111
111222333444444333222111
111222333444444333222111
111222233344443332222111
011122233333333332221110
011122223333333322221110
011112222233332222211110
001111222222222222111100
000111122222222221111000
000011111222222111110000
For each number, convert it into a pixel of the corresponding color (gray level). If there are 4 distinct numbers (from 0 to 3), then the colors will be: black, light grey, dark gray and white.
If the size of the image is not known, dCode can use newlines if they exist.
dCode retains ownership of the "Image in Numbers" source code. Except explicit open source licence (indicated Creative Commons / free), the "Image in Numbers" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Image in Numbers" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Image in Numbers" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "Image in Numbers" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Image in Numbers on dCode.fr [online website], retrieved on 2024-11-18,