0 Members and 1 Guest are viewing this topic.
DescriptionConverts JPG images to ASCII. You know you want it. JP2A logoAboutjp2a is a small utility that converts JPG images to ASCII. It's written in C and released under the GPL.DownloadDownload jp2a from Sourceforge. Windows users will find a binary download there.Source codeYou can browse the jp2a subversion source code repository.ScreenshotsYou can view an online jp2a gallery and try for yourself over at asciiconvert.com. Check out the JPEG screenshots of jp2a.ThumbnailsHere are some other images in plain text: Oswald, the lucky rabbit (side view) Oswald, the lucky rabbit (front view) Google-logo BenderHere are some color HTML-images: Bender (ASCII, HTML color) A dog, fence and mountains (ASCII, HTML color)Building and installingGeneralCompilation of jp2a requires jpeglib with libcurl as a recommended option. On many systems you can just do the following to compile jp2a:./configuremakemake test # optionalmake installIf 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/localIf you need to build jpeglib yourselfDownload the sources from IJG.org and build them like for instance this:./configure --prefix=/usrmakemake install-lib # simply make install is not good enough for jp2aMac OS Xjp2a is now part of DarwinPorts, so if you do asudo port install jp2athen everything should be installed.FreeBSDYou can use the Freshports:pkg_add -r jp2aDebianYou can use the Debian package:apt-get install jp2aGentooYou can use the Gentoo package:emerge jp2aReading other graphics formatsIn normal operation, you'd use jp2a with something likejp2a --width=76 file.jpgHowever, if you want to be able to read other graphics-formats, you can use ImageMagick's convert program with pipes, likeconvert 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 netjp2a now handles downloading by using libcurl. Just do this:jp2a http:/ /foo.bar/image.jpgIf 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 jp2aI wanted a small project to teach myself how to use various libraries and autotools.SuggestionsIf you have any suggestions or code patches, I will be very glad to hear from you. You can email me to email@example.com.I was asked if there are any bindings for Python. Unfortunately, no, but if anyone wants to make that, let me know.
....... .':. .::'....':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' .'....
Page created in 0.097 seconds with 16 queries.