Cosmic-Infinity / ASCEE

An easy to use application to create ASCII Art, written in java.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ASCEE

Ah yes, ASCII, the great grandfather of Unicode, the first chapter of any computer book, the source of so many security vulnerabilities (unicode is to blame, but who's reading this anyways), and a way of creating sick art? Yes, ASCII Art is a thing. And long before images on computers, ascii art was all you could get, all 7 bits of it.

Creating ASCII Art is hard. And let's face it, hardly anyone is creating them by hand these days (No offense to the one 0.01%). So here's simple "tool" to do just that.

Say hello to ASCEE.


Why?

Just because I can. It was a slow Friday afternoon, and I was bored. Had this idea to turn images into ASCII art, so here it is. Now I'm not ashamed to admit that I may have had some help from stackexchange, but that's besides the point. 😘

It was cleaned up and rewritten over the weekend and I may or may not be be writing this introduction a week from then, so don't mind the messy code, I tried my best. Cut me some slack.


How do I boogie?

  1. Just download/copy the code over to a new .java file and run it.
  2. Make sure you have an image file on the Desktop named image or else you'll get this lovely error. (Supported format : .jpg , .jpeg , .png , .gif (animation data is ignored))

Sample Error

  1. Once the processing is done, you'll see a new file on you desktop named ascii.txt which will contain your result.

For your own sanity.

Windows Notepad has difficulty recognising character encoding at times. Or maybe windows just hates my program implementation in particular. If your ascii art output looks like complete gibbrish, try using Notepad++. Oh and also, remember to zoom out on the text Ctrl + mouse scroll

Erroneous Processing
I did not type that


Based on image size, compression parameter, and your PC's general performance, processing may take time. Processing is finished when **READY** is displayed on the terminal. Do not be alarmed if it's taking time. Although if you're not playing around with the parameters too drastically, it's unlikely you'll have to wait.
Processing
Sill Processing.
Ready
Finished processing.

Talking about processing, you'll noice that the program isn't multithread. That's because I do not know multithreading. LOL. Don't be alarmed if you see things like this

Brrrrrrr
Thread 2 go BRRRRRRRRR

Samples

Input
Input Image
Input
Scaled and Decoloured
Output
ASCII Output
Input
Input Image
Output Normal
ASCII Output
Output Inverted
ASCII Output Inverted
Input
Input Image
Output High
ASCII High Bit-Depth
Output Low
ASCII Low Bit-Depth

Size, Scale, Amount of Detail, everything can be controlled by modifying the in-built variables.


How do I boogie some more?

What? You want more? Alright alright. See those variables in the code? Not all of them are meant to be touched. DO NOT TOUCH THEM ALL. Though you may touch these

⦿ boolean inversion : flag used to invert the colour space. Set it ture and the black and white will invert.

⦿ int compressionfactor : Determines how much smaller the ascii art should be. Higher the numbe = more the compression = smaller the ascii art. Images have a lot of pixels, all of them can't be used for character based art. Therefore I also don't recommend setting this number to 1. Trust me, you don't wanna wait for 90 seconds to get your image out. (Range : 1 to 10, maybe? it's not hardcoded, so go nuts)

⦿ byte mode : This generator comes with 2 modes. high and low bit depth, determined by 1 or 2. Based on your preference or the image, one might give more pleasing result than the other.

⦿ It is not recommended to play around with working variables or lookup constants unless you know exactly what you're doing.

⦿ Non-exposed variable can be tweaked if you're feeling adventurous. int scaledownConstant scales down every image by a particular amount before the main scaling process runs. Too small a number can lead higher processing time. But you do you.

About

An easy to use application to create ASCII Art, written in java.

License:GNU General Public License v3.0


Languages

Language:Java 100.0%