Images now can be crudely converted to text. The program first scales down the image to the desired size, then calculates the luminance of each pixel and looks up the corresponding symbol for that level of brightness, with @ being the darkest and being the lightest, although this palette can easily be changed in code. The top image is a black to white gradient and the bottom is a test of the alpha channel. My next goals are to change the argument class to have different child classes based on value type and allow associated functions. I want to also implement basic terminal colouring, allow contrast control, allow edge detection and custom palettes.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.