source: www/index.html @ 1128

Last change on this file since 1128 was 1128, checked in by Sam Hocevar, 17 years ago
  • More web stuff.
  • Property svn:keywords set to Id
File size: 12.6 KB
Line 
1<?php header("Content-Type: text/html; charset=utf-8"); ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3       "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
4
5<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
7<head>
8   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9   <meta name="GENERATOR" content="vim" />
10   <meta name="Author" content="sam@zoy.org (Sam Hocevar)" />
11   <meta name="Description" content="libcaca - Colour AsCii Art library" />
12   <meta name="Keywords" content="libcaca, ASCII, ASCII ART, console, text mode, ncurses, slang, AAlib" />
13   <title>libcaca - Colour AsCii Art library</title>
14   <link rel="icon" type="image/x-icon" href="/favicon.ico" />
15   <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
16   <link rel="stylesheet" type="text/css" href="/main.css" />
17</head>
18
19<body>
20
21<?php include($_SERVER["DOCUMENT_ROOT"]."/header.inc"); ?>
22
23<img src="logo-caca.png" width="128" height="128"
24     alt="libcaca logo" class="caca" />
25
26<h2> Introduction </h2>
27
28<p> <i>libcaca</i> is a graphics library that outputs text instead of pixels,
29so that it can work on older video cards or text terminals. It is not unlike
30the famous <a href="http://aa-project.sourceforge.net/aalib/">AAlib</a>
31library, with the following improvements:
32
33<ul>
34  <li> Unicode support </li>
35  <li> 4096 available colours (some devices can only handle 16) </li>
36  <li> dithering of colour images </li>
37  <li> advanced text canvas operations (blitting, rotations) </li>
38</ul>
39
40<p> Libcaca works in a text terminal (and should thus work on all Unix
41systems including Mac OS X) using the S-Lang or ncurses libraries. It also
42works natively on DOS and Windows.
43
44<p> Libcaca is <a href="http://www.gnu.org/philosophy/free-sw.html">free
45software</a>, and can be used, modified and distributed under the terms of the
46<a href="http://sam.zoy.org/wtfpl/">Do What The Fuck You Want To Public
47License</a>. The logo on this page is copyrighted by Akira Toriyama so if
48anyone fancies drawing a new logo it would be much appreciated. </p>
49
50<h2> Screenshots </h2>
51
52<p> Here are a few <i>libcaca</i> screenshots. </p>
53
54<table cellspacing="5" border="0">
55  <tr>
56    <td align="center">
57      <a href="img/stitch-80x45.png"><img alt="cacaview"
58         width="73" height="90"
59         src="img/tn-stitch-80x45.jpeg" /></a>
60      <br /><small><code>cacaview</code></small>
61    </td>
62    <td align="center">
63      <a href="img/cacaball-80x50.png"><img alt="cacaball"
64         width="101" height="90"
65         src="img/tn-cacaball-80x50.jpeg" /></a>
66      <br /><small><code>cacaball</code></small>
67    </td>
68    <td align="center">
69      <a href="img/cacaplas-80x50.png"><img alt="cacaplas"
70         width="101" height="90"
71         src="img/tn-cacaplas-80x50.jpeg" /></a>
72      <br /><small><code>cacaplas</code></small>
73    </td>
74    <td align="center">
75      <a href="img/truecolor-32x16.png"><img alt="truecolor"
76         width="87" height="90"
77         src="img/tn-truecolor-32x16.jpeg" /></a>
78      <br /><small>TrueColor</small>
79    </td>
80    <td align="center">
81      <a href="img/unicode-80x24.png"><img alt="unicode"
82         width="120" height="75"
83         src="img/tn-unicode-80x24.jpeg" /></a>
84      <br /><small>Unicode</small>
85    </td>
86  </tr>
87</table>
88
89<p> See also the various export formats:
90  <a href="export.png">PNG</a> (through TGA),
91  <a href="export.html">HTML</a>,
92  <a href="export.svg">SVG</a>,
93  <a href="export.ps">PostScript</a>.
94</p>
95
96<h2> Where is the old <i>libcaca</i> page? </h2>
97
98<p> <i>libcaca</i> is currently undergoing a massive rewrite, and as such
99all previous patches and code examples are broken. Until this is done I have
100decided to put most of this page offline. </p>
101
102<p> By the way, the old <i>libcaca</i> (all versions up to 0.9) was under the
103restrictive LGPL license. Though I got permission from all copyright holders
104to relicence the current codebase under the WTFPL, such a permission is not
105retroactive and you should consider old versions as still covered by the LGPL.
106</p>
107
108<!--
109<p> Here are my first libcaca attempts. The first image is,
110<code>cacaview</code>, the libcaca image viewer. Then, two
111screenshots of my first port of an application to libcaca: the <a
112href="http://www.videolan.org/vlc/">VLC</a> media player. The last
113screenshots are from <code>cacafire</code> (the libcaca port of aafire) and
114<code>cacaball</code> (a mini metaballs demo). </p>
115
116<table cellspacing="5" border="0">
117  <tr>
118    <td align="center">
119      <a href="caca-stitch.png"><img alt="cacaview"
120         width="78" height="90"
121         src="tn-caca-stitch.jpeg" /><br /><code>cacaview</code></a>
122    </td>
123    <td align="center">
124      <a href="caca-vlc.png"><img alt="VLC playing the Matrix: Revolutions"
125         width="120" height="74"
126         src="tn-caca-vlc.jpeg" /><br />VLC media player</a>
127    </td>
128    <td align="center">
129      <a href="caca-vlc3.png"><img alt="VLC playing a Dolby trailer"
130         width="120" height="74"
131         src="tn-caca-vlc3.jpeg" /><br />VLC media player</a>
132    </td>
133    <td align="center">
134      <a href="caca-fire.png"><img alt="cacafire"
135         width="120" height="87"
136         src="tn-caca-fire.jpeg" /><br /><code>cacafire</code></a>
137    </td>
138    <td align="center">
139      <a href="caca-ball.png"><img alt="cacaball"
140         width="104" height="90"
141         src="tn-caca-ball.jpeg" /><br /><code>cacaball</code></a>
142    </td>
143  </tr>
144</table>
145
146<p> As with all image processing applications, I needed the obligatory <a
147href="http://www-2.cs.cmu.edu/~chuck/lennapg/">Lenna</a> samples. From
148left to right: the currently in development Floyd-Steinberg dithering, the
149antialiasing introduced in libcaca 0.5, the new renderer in libcaca 0.2, no
150dithering, ordered dithering, random dithering. </p>
151
152<table cellspacing="5" border="0">
153  <tr>
154    <td align="center">
155      <a href="lenna-fs.png"><img alt="Lenna (Floyd-Steinberg)"
156         width="87" height="90"
157         src="tn-lenna-fs.jpeg" /><br />Floyd-Steinberg</a>
158    </td>
159    <td align="center">
160      <a href="lenna-antialias.png"><img alt="Lenna (antialiased)"
161         width="97" height="90"
162         src="tn-lenna-antialias.jpeg" /><br />antialiasing</a>
163    </td>
164    <td align="center">
165      <a href="lenna-new.png"><img alt="Lenna (new renderer)"
166         width="99" height="90"
167         src="tn-lenna-new.jpeg" /><br />new renderer</a>
168    </td>
169    <td align="center">
170      <a href="lenna-nodither.png"><img alt="Lenna (no dithering)"
171         width="99" height="90"
172         src="tn-lenna-nodither.jpeg" /><br />no dithering</a>
173    </td>
174    <td align="center">
175      <a href="lenna-ordered.png"><img alt="Lenna (ordered dithering)"
176         width="99" height="90"
177         src="tn-lenna-ordered.jpeg" /><br />ordered dithering</a>
178    </td>
179    <td align="center">
180      <a href="lenna-random.png"><img alt="Lenna (random dithering)"
181         width="99" height="90"
182         src="tn-lenna-random.jpeg" /><br />random dithering</a>
183    </td>
184  </tr>
185</table>
186
187<p> Here are a few examples of my libcaca patch for libSDL. Once there is a
188libcaca backend for <a href="http://www.libsdl.org">libSDL</a>, any program
189using SDL can automatically benefit from libcaca’s rendering routines. These
190examples show <a href="http://www.frozen-bubble.org/">Frozen Bubble</a>, the
191<a href="http://sabre.cobite.com/">SABRE</a> flight simulator, and the famous
192<a href="http://www.idsoftware.com/games/doom/">Doom</a>. Frozen Bubble is
193fully playable, but SABRE and Doom aren’t much due to the Ctrl and Shift keys
194not being recognized (see the TODO list about that). </p>
195
196<table cellspacing="5" border="0">
197  <tr>
198    <td align="center">
199      <a href="caca-fb.png"><img alt="ASCII art Frozen Bubble"
200         width="120" height="90"
201         src="tn-caca-fb.jpeg" /><br />Frozen Bubble</a>
202    </td>
203    <td align="center">
204      <a href="caca-sabre.png"><img alt="the SABRE flight simulator"
205         width="120" height="90"
206         src="tn-caca-sabre.jpeg" /><br />SABRE</a>
207    </td>
208    <td align="center">
209      <a href="caca-doom.png"><img alt="the Doom splash screen in ASCII art"
210         width="120" height="90"
211         src="tn-caca-doom.jpeg" /><br />Doom splash screen</a>
212    </td>
213    <td align="center">
214      <a href="caca-doom2.png"><img alt="Doom in ASCII art"
215         width="120" height="90"
216         src="tn-caca-doom2.jpeg" /><br />first Doom level</a>
217    </td>
218  </tr>
219</table>
220
221<h2> Download libcaca </h2>
222
223<p> libcaca is already in the Debian sid distribution. Debian woody users or
224sid users in a hurry may use one of the following apt sources: (sorry, sarge
225is not supported yet) </p>
226
227<table class="leftmenu" cellspacing="5" cellpadding="0">
228  <tr>
229    <td class="nowrap" valign="top">
230      <code>
231        deb http://sam.zoy.org/projects/debian woody main<br />
232        deb-src http://sam.zoy.org/projects/debian woody main<br />
233        <br />
234        deb http://sam.zoy.org/projects/debian sid main<br />
235        deb-src http://sam.zoy.org/projects/debian sid main<br />
236      </code>
237    </td>
238  </tr>
239</table>
240
241<p> Users of RPM-based distributions (Red Hat, Fedora, Mandrake) may find RPM
242packages on the <a href="http://yarrow.freshrpms.net/rpm.html?id=552">Fresh
243RPMs</a> page. If no package is available, you are encouraged
244to build packages for your system using this SRPM (<a
245href="libcaca-0.9-1.src.rpm">libcaca-0.9-1.src.rpm</a>, 176KB) and this simple
246command line: </p>
247
248<table class="leftmenu" cellspacing="5" cellpadding="0">
249  <tr>
250    <td class="nowrap" valign="top">
251      <code>rpm -<!>-rebuild libcaca-0.9-1.src.rpm</code>
252    </td>
253  </tr>
254</table>
255
256<p> BSD users should see the <a
257href="http://www.netbsd.org/packages/graphics/libcaca/README.html">NetBSD port
258page</a> and the <a href="http://www.freshports.org/graphics/libcaca/">FreeBSD
259port page</a> (I am not aware of an OpenBSD port yet, but <a
260href="http://news.gw.com/openbsd.ports/15502">this email</a> has
261information on it), Gentoo users may find information on the <a
262href="http://gentoo-portage.com/browse-program.php?program=6273">Gentoo
263portage</a> and Slackware users have a package on <a
264href="http://www.linuxpackages.net/pkg_details.php?id=2144">linuxpackages.net</a>.
265</p>
266
267<h2> Patch for libSDL </h2>
268
269<p> This simple patch was quickly hacked from the AAlib video
270driver. Apply it to the libSDL sources and configuree libSDL with
271<code>-<!>-enable-video-caca</code>. Then use the <code>SDL_VIDEODRIVER</code>
272environment variable to run your SDL programs with libcaca output, for
273instance Frozen Bubble: </p>
274
275<table class="leftmenu" cellspacing="5" cellpadding="0">
276  <tr>
277    <td class="nowrap" valign="top">
278      <code>SDL_VIDEODRIVER=caca frozen-bubble</code>
279    </td>
280  </tr>
281</table>
282
283<p> Download <a href="patch-libsdl1.2-libcaca0.7.diff">patch-libsdl1.2-libcaca0.7.diff</a> (to be used with the Debian unstable SDL sources and libcaca 0.7. </p>
284
285<h2> Patches for VLC, xine, mplayer... </h2>
286
287<p> The libcaca patch for the <a href="http://www.videolan.org/vlc/">VLC</a>
288media player was already applied upstream. Check the CVS version. </p>
289
290<p> There is a work in progress for <a href="http://xine.sf.net/">xine</a>
291called cacaxine (see <a href="http://sourceforge.net/mailarchive/forum.php?thread_id=3605187&amp;forum_id=7131">this email</a>). Zeeshan Ali wrote a
292<a href="http://gstreamer.sf.net/">GStreamer</a> plugin. I am not
293aware of an <a href="http://mplayerhq.hu/">MPlayer</a> patch yet (but you
294should not be using MPlayer anyway, because it sucks). </p>
295
296<h2> Development </h2>
297
298-->
299
300<h2> Why? </h2>
301
302<blockquote><p>
303Que dites-vous ?... C’est inutile ?... Je le sais !
304<br />Mais on ne se bat pas dans l’espoir du succès !
305<br />Non ! non, c’est bien plus beau lorsque c’est inutile !
306<br /><small> -- Edmond Rostand, <i>Cyrano de Bergerac</i> </small>
307</p></blockquote>
308
309<p> I am perfectly aware that <i>libcaca</i> is the waste of time it looks to
310be. No need to tell me about that. I urge you to read Théophile Gautier’s
311preface to <i>Mademoiselle de Maupin</i>, which also gives an excellent
312explanation for the name “libcaca”: </p>
313
314<blockquote><p>
315Il n’y a rien de vraiment beau que ce qui ne peut servir à rien ; tout ce
316qui est utile est laid ; car c’est l’expression de quelque besoin ; et ceux
317de l’homme sont ignobles et dégoûtants, comme sa pauvre et infirme nature. -
318L’endroit le plus utile d’une maison, ce sont les latrines.
319</p></blockquote>
320
321<p> As for the name “libcucul”, please refer to the pioneer of modernist
322Polish fiction: </p>
323
324<blockquote><p>
325Mais contre le cucul, il n’y a pas de refuge. Courez après moi
326si vous voulez, je m’enfuis la gueule entre les mains. Et voilà,
327tralala, Zut à celui qui le lira !
328<br /><small> -- Witold Gombrowicz, <i>Ferdydurke</i> </small>
329</p></blockquote>
330
331<?php include($_SERVER["DOCUMENT_ROOT"]."/footer.inc"); ?>
332
333</body>
334</html>
Note: See TracBrowser for help on using the repository browser.