Simple Picture to ASCII converter



This was a relatively simple program that I wrote a couple years ago, yet it is one of my favorite projects. Written in Java, this project takes a file-path that you input (pointing to a image file), looks through every pixel of the image, gets the RGB value, and performs a mapping from RGB space to greyscale space (0.2989*Red + 0.5870*Green + 0.1140*Blue) (mapping algorithm). That greyscale value is then fed into a lookup table to find the proper ASCII character and written into a standard text file. The program also lets you select a scaling factor. The files below are uncompressed, meaning that each pixel is represented by a single character. These uncompressed text files will often be many megabytes, as that is typically the number of pixels in an image file.
What makes this project interesting, and what you may notice below, is that due to the lack of darker ASCII characters, darker gradients will have interesting boundaries. This is not because of my program, but because of hidden color information that our eyes don't notice from looking at the image. This is particularly visible in the bird image, and creates quite cool patterns in the 'Up' balloon image as well.

Here are some images of the program in action:

IMG IMG IMG

IMG IMG IMG

IMG IMG IMG

IMG IMG IMG

IMG IMG IMG

IMG IMG IMG

IMG IMG IMG


Here is what the images look like if you scale down the image during the conversion. I think this is less interesting although still cool:

IMG IMG IMG





** None of the above images are mine and are used solely as demonstrations for my program. If the creator of an above image wants it removed please contact me.

As noted above, the program will produce much smaller ASCII images although they do not display the interesting patterns of brightness in as much detail and as such, I find them less interesting.

All content on this page belongs to Zachary Porter. You may use, reproduce, or modify anything from this website, provided that you give credit to zackporter.com in your usage.