A simple tool to convert images to ASCII, built with only TypeScript and without any libraries
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Technically works now! It was super easy to convert the brightness values into text. I just found a palette of characters and put them all into a string, side by side. Then, to figure out which one to use, I just indexed into it with an index of: floor(brightness * (palette.length - 1)). This essentially maps the brightness values from [0, 1] to [0, pallete length - 1], allowing it to index the big palette string. Next up is setting a custom width because currently, the generated images are MASSIVE
Grayscale conversion works! This was super simple to get working: average the red, green, and blue components and multiply by the alpha. I might try different colour spaces in the future, such as Oklab
Implemented a simple drag and drop functionality for files! It's been ages since I've done this so I had to do a bit of googling for this one. Next up is probably loading the image and getting the brightness of each pixel in preparation for turning it into ASCII