int 0x80

gorlist@int0x80:~$ cd ~/projects; ls -la
drwxr-xr-x 2 gorlist gorlist  120 2007-10-08 20:45 .
drwxr-xr-x 6 gorlist gorlist 1216 2007-10-08 20:45 ..
-rw-r--r-- 1 gorlist gorlist 4250 2007-10-30 00:33 bullpaper
-rw-r--r-- 1 gorlist gorlist 2020 2007-12-20 07:48 pichax
-rw-r--r-- 1 gorlist gorlist 2461 2008-01-15 09:56 pdflist


pichax (pronounced pic hax) is a Perl script that converts pictures to colored ASCII characters.
It outputs validated HTML files.
It uses the PerlMagick module.
Note that some pages generated may be very heavy for the browser, due to the large number of span tags.
You can configure the image size by changing the the values of the $ilevel and $jlevel variables.
Different image size may need different levels.
The default one (5-9) is good enough for most large images.
Some browsers handle the pages better than some others.
Firefox is was horrible with the page rendering, it takes took ages on large images.

The text used may be the default one ($char holds this value), or you might specify a third argument which is the text file.

Sample output: I have also included the original input picture in these examples.
int0x80 logo with the default character
BMW with the text "bmw"
Perl Camel with the source code (doesn't appear that good because it has characters of variable sizes and it stretches some lines more than others)

You can find the source here.

Copyright © gorlist 2007-2017