Author Topic: jp2a is a small Windows utility that converts JPG images to ASCII Art  (Read 3127 times)

0 Members and 1 Guest are viewing this topic.

Software Santa

  • Administrator
  • *****
  • Join Date: Dec 2006
  • Posts: 5238
  • Operating System:
  • Mac OS X 10.9 Mac OS X 10.9
  • Browser:
  • Firefox 28.0 Firefox 28.0
jp2a is a small Windows utility that converts JPG images to ASCII Art.

Quote
Description

Converts JPG images to ASCII. You know you want it.


JP2A logo
About
jp2a is a small utility that converts JPG images to ASCII. It's written in C and released under the GPL.
Download
Download jp2a from Sourceforge. Windows users will find a binary download there.
Source code
You can browse the jp2a subversion source code repository.
Screenshots
You can view an online jp2a gallery and try for yourself over at asciiconvert.com. Check out the JPEG screenshots of jp2a.

Thumbnails
Here are some other images in plain text:

    Oswald, the lucky rabbit (side view)
    Oswald, the lucky rabbit (front view)
    Google-logo
    Bender

Here are some color HTML-images:

    Bender (ASCII, HTML color)
    A dog, fence and mountains (ASCII, HTML color)

Building and installing
General
Compilation of jp2a requires jpeglib with libcurl as a recommended option. On many systems you can just do the following to compile jp2a:

./configure
make
make test    # optional
make install

If you have jpeglib installed in non-standard directory, say in /opt/local/include/jpeglib.h and /opt/local/lib/libjpeg.a then you can do

./configure --with-jpeg-prefix=/opt/local

If you need to build jpeglib yourself
Download the sources from IJG.org and build them like for instance this:

./configure --prefix=/usr
make
make install-lib   # simply make install is not good enough for jp2a

Mac OS X
jp2a is now part of DarwinPorts, so if you do a

sudo port install jp2a

then everything should be installed.
FreeBSD
You can use the Freshports:

pkg_add -r jp2a

Debian
You can use the Debian package:

apt-get install jp2a

Gentoo
You can use the Gentoo package:

emerge jp2a

Reading other graphics formats
In normal operation, you'd use jp2a with something like

jp2a --width=76 file.jpg

However, if you want to be able to read other graphics-formats, you can use ImageMagick's convert program with pipes, like

convert somefile.png jpg:- | jp2a --width=76 -

Convert is a very nice utility, letting you set a lot of options that might enhance the ASCII output (e.g. by setting contrast and brightness). Another example, increase brightness by 170% and then rotate 45 degress clockwise:

convert bender.bmp -modulate 170 -rotate 45 jpg:- | jp2a -

Convert handles just about any graphics-format you can think of, including video formats and vector formats like PDF and Postscript (handled by convert using Ghostscript).

Reading images off the net
jp2a now handles downloading by using libcurl. Just do this:

jp2a http:/ /foo.bar/image.jpg

If you didn't compile jp2a with curl, you can use another HTTP reader and pipe the result to jp2a: For instance, to download and convert the Google logo all on the fly, you can do this:

convert http:/ /www.google.com/intl/en/images/logo.gif jpg:- | jp2a -           
                                                                     
       .......                                       .':.             
    .::'....':xd.                                     dX'             
  .ld.        ..       .                              oX.          ...
  ;O'              .c;..'cxc    ;,...,c;.  .:'.,lxc.  dX.  ,:'.,dx.. .
  oO.             .ox.    ,x0 .cd.    .cd..ll    l0.  xX. :K,..,::.   
  cxx.      .',cl 'x0      lK'.cx      ;k, lO;  .ll.  dX. o0:         
   ,dkc.      :kd  :kx.   :d;  ,ol.   .lc.  .''lk'    kX'  oOo'...   
     .;:cc;,,',,.    .;;,'..     .,,'...   ''',:lxo. .','.  .,::;.   
                                         .oc.     dO                 
                                          lk;....'c'                 
                                            .'....                   

                                                                     

Why I made jp2a
I wanted a small project to teach myself how to use various libraries and autotools.

Suggestions
If you have any suggestions or code patches, I will be very glad to hear from you. You can email me to csl@sublevel3.org.

I was asked if there are any bindings for Python. Unfortunately, no, but if anyone wants to make that, let me know.

http://csl.name/jp2a/

http://jp2a.sourceforge.net/

http://sourceforge.net/projects/jp2a
« Last Edit: April 15, 2014, 10:13:20 PM by Software Santa »

 

Software Santa first opened on January 1st, 2007
Now celebrating 16 Years of being a Digital Santa Claus!
Software Santa's Speedy Site is Proudly Hosted by A2 Hosting.

Welcome Visitor:





@MEMBER OF PROJECT HONEY POT
Spam Harvester Protection Network
provided by Unspam



Software Santa Welcome Page

The Software Santa Privacy Policy

email