Your goal is to write a program / script which "converts" real images into ascii art.
Your program will get a path to a image file over stdin or as parameter (whatever you prefer). The format will be jpeg.
It should "convert" it to ascii art and save it to the harddrive.
The image will be in grayscale. You don't have to check if the input file exists or the file is a valid image.
You can use any utf-8 character in your outputfile.
- You must be able to recognize the output image.
- Your program must recognize the path on
- The content of the original image must be read from the drive (you get only the path to the file)
- No user interaction (except giving the parameters at startup) allowed
- Must terminate without any error message
- The output must be written to the harddrive (output name is up to you)
- Only turing complete languages allowed.
- If you require any special language version for your program you have to add it to your answer. Otherwise the newest stable version will be used (e.g. python = python 3.3)
- -10 Points for every additional image format your program can convert (please write down which formats can be recognized)
- -25 Points if your program can change the output size (width / height parameters at startup in characters)
- -100 Points if you don't use any Image Processing libraries (e.g. PIL, ImageMagic, GD...)
- -50 Points if your program source looks like ascii art itself ;)
Formula to calculate your points:
points = floor(programSize (in Bytes) * avgRuntimeOnTestInput (in seconds) - BonusPoints)
How your program will be tested:
All programs will run on a new virtual machine running Debian x64 (current version) with 512MB memory, 2x3,4Ghz CPU.
The time will be calculated on an average of three pictures per format with different size and content (every program will be use the same files).
Please write your programcall into your answer so i can check it (and if required the needed compile parameters).
Example program call (with bonus parameters):
python ascii.py -file /home/chill0r/test/MyPicture.jpeg -width 1000 -height 750 -out /home/chill0r/test/MyPictureAscii.txt
I'll check the answers every few days and post a 'low score' (high score doesn't really fit on code golf...). (Meaning you don't have to calculate your points on your own)