This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The basic idea is that I loop through all characters and count the number of | |
pixels and make <Hashtable number of pixels as a key and character as value> | |
The table will not have 255 value so to cover this I had to calculate the | |
slope of change as a base step for the colors. | |
example, if we have 50 value and we need 255 value, then each 255/50 = 5.1 | |
Then with each gray color we will devied by 5 so we have index to | |
be fetched from the keys of the pixels table |