-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
38 lines (25 loc) · 1.24 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
libcaca.js
A toy project to learn howto port a simple library to emscripten and not
die trying.
There is two ways of using libcaca.js
** img2txt.js
This is the command line tool to convert a image to ascii art, since this
is not compiled agains imlib2, the input format must be a bmp hopefully
we can use canvas2image.js (http://www.nihilogic.dk/labs/canvas2image/)
to transform a canvas into a bmp. A slighty modifications are need into
canvas2image to get the raw data instead of base64 uri.
** libcaca.js
Exporting the library itsef and calling the low level function on javascript,
it's much more efficient
Take a look to the demo page :) and to the post http://coscolla.net/?p=236
1) http://experiments.coscolla.net/img2txt/
2) http://experiments.coscolla.net/libcaca/
Instructions to get emscriptten working on macosx
1) Download emscripten from https://github.com/kripken/emscripten/wiki/Emscripten-SDK
2) ./emsdk update
3) ./emsdk install latest
4) ./emsdk activate latest
5) export PATH=$PATH:$(WHAT_SAYS_IN_THE_ACTIVATE_STATE)
now you must have emcc, emconfigure and emmake in your path
Remember to do a git submodule init; git submodule update to download the libcaca submodule, and
last step simply is execute the scripts to compile :D