
ASCII generator: image to text, image to image, video to video - benryon
https://github.com/vietnguyen91/ASCII-generator
======
dukoid
If you'd like to actually quickly preview images in the terminal, you might be
interested in my tiv app:
[https://github.com/stefanhaustein/TerminalImageViewer](https://github.com/stefanhaustein/TerminalImageViewer)

(it uses a block graphics character matching algorithm to get a slightly
better resolution than 2 pixel per character)

~~~
Theodores
Ah... the things that others don't see. Lenna - the classic image, the
distinctive Ubuntu of the terminal window, as per the original article.

I have not worked it out yet but it must be possible to use this type of thing
- ASCII art - for those images that you can download inline with a web page to
show before the main images download. As per the BBC that always include an
inline image with a news story download so you have something to look at on a
3G connection whilst the rest downloads.

~~~
dukoid
For the web image preview use case, it would probably be quite hard to beat
data urls: color encoding would be quite verbose, and getting consistent
character availability and widths will be tricky, too...

------
Klasiaster
Maybe better look at chafa: [https://hpjansson.org/blag/2019/01/07/the-worst-
ansi-rendere...](https://hpjansson.org/blag/2019/01/07/the-worst-ansi-
renderer-except-for-all-the-others/)
[https://hpjansson.org/chafa/](https://hpjansson.org/chafa/)
[https://github.com/hpjansson/chafa/](https://github.com/hpjansson/chafa/)

------
classichasclass
It's a good start. However, some dithering options, even a simple Floyd-
Steinberg implementation, would probably help improve the quality a bit. This
is a tool I wrote a while back that does a similar thing and there are output
examples at the bottom off the classic Lena image which can give you an idea
of the difference:
[https://www.floodgap.com/software/ppmascii/](https://www.floodgap.com/software/ppmascii/)

------
aboutruby
Related: [http://caca.zoy.org/wiki/libcaca](http://caca.zoy.org/wiki/libcaca)
(even works with VLC to watch movies)

------
allenu
This reminds me of AA-lib, which has been around for a while: [http://aa-
project.sourceforge.net/gallery/](http://aa-project.sourceforge.net/gallery/)

------
peterisza
Looks like shit. I am sure it would be possible to correctly match the
brightness.

~~~
dessant
Software often gets better upon further iteration, and we can do our part by
offering our time, or at the least, encouraging fellow developers.

~~~
owlninja
Well said. I also hate when someone shows something on HN and everyone just
replies with links to another similar project...the author almost never says
they are trying to beat some other project or one-up anyone!

