1img2txt(1) General Commands Manual img2txt(1)
2
3
4
6 img2txt - convert images to various text-based coloured files
7
9 img2txt [ -W width ] [ -H height ] [ -x font-width ] [ -y font-height ]
10 [ -b brightness ] [ -c contrast ] [ -g gamma ]
11 [ -d dither ] [ -f format ] FILE
12
14 img2txt converts images to colour ASCII characters and outputs them to
15 text-based coloured files.
16
17 img2txt can load the most widespread image formats: PNG, JPEG, GIF,
18 PNG, BMP etc (see NOTES for details). By default the output text is 60
19 columns wide, and the line count is computed accordingly to respect
20 aspect ratio of original file. The default output format is standard
21 ANSI coloured text.
22
23
25 -W, --width=<width>
26 Change output column count. If not given, the default is set to
27 60.
28
29 -H, --height=<height>
30 Change output line count. If not given, the height is computed
31 to match correct aspect ratio.
32
33 -x, --font-width=<width>
34 Change output font width. If not given, the default is set to 6.
35 This value will be used for computing aspect ratio.
36
37 -y, --font-height=<height>
38 Change output font height. If not given, the default is set to
39 10. This value will be used for computing aspect ratio.
40
41 -b, --brightness=<brightness>
42 Change image brightness. Default to 1.0.
43
44 -c, --contrast=<contrast>
45 Change image contrast. Default to 1.0.
46
47 -g, --gamma=<gamma>
48 Change image gamma. Default to 1.0.
49
50 -d, --dither=<dither>
51 Change dithering algorithm. This can be one of the following
52 (default to fstein) :
53 none : Nearest color
54 ordered2 : Ordered 2x2
55 ordered4 : Ordered 4x4
56 ordered8 : Ordered 8x8
57 random : Random
58 fstein : Floyd Steinberg
59
60 -f, --format=<format>
61 Change output format. This can be one of the following (default
62 to ansi) :
63 ansi : coloured ANSI
64 caca : internal libcaca format
65 utf8 : UTF8 with CR
66 utf8cr : UTF8 with CRLF (MS Windows)
67 html : HTML with CSS and DIV support
68 html3 : Pure HTML3 with tables
69 irc : IRC with ctrl-k codes
70 bbfr : BBCode (French)
71 ps : Postscript
72 svg : Scalable Vector Graphics
73 tga : Targa Image
74
75 -h, --help
76 Display help message and exit.
77
78 -v, --version
79 Display version of the program and exit.
80
81
83 img2txt hello.jpg > hello.ans
84
85 img2txt --width=40 --format=svg hello.jpg > tinyhello.svg
86
87
89 Setting both column and line count (using --width and --height) will
90 let you choose the exact output size without taking aspect ratio in
91 account.
92
93 You must compile libcaca package with support of Imlib2 to be able to
94 load a wide variety of image formats. Otherwise you will only be able
95 to load regular BMP files.
96
97
99 cacaview(1)
100
102 This manual page was written by Sam Hocevar <sam@hocevar.net> and Jean-
103 Yves Lamoureux <jylam@lnxscene.org>.
104
105
106
107libcaca 2007-11-07 img2txt(1)