Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

img2txt(1) [debian man page]

img2txt(1)						      General Commands Manual							img2txt(1)

NAME
img2txt - convert images to various text-based coloured files SYNOPSIS
img2txt [ -W width ] [ -H height ] [ -x font-width ] [ -y font-height ] [ -b brightness ] [ -c contrast ] [ -g gamma ] [ -d dither ] [ -f format ] FILE DESCRIPTION
img2txt converts images to colour ASCII characters and outputs them to text-based coloured files. img2txt can load the most widespread image formats: PNG, JPEG, GIF, PNG, BMP etc (see NOTES for details). By default the output text is 60 columns wide, and the line count is computed accordingly to respect aspect ratio of original file. The default output format is standard ANSI coloured text. OPTIONS
-W, --width=<width> Change output column count. If not given, the default is set to 60. -H, --height=<height> Change output line count. If not given, the height is computed to match correct aspect ratio. -x, --font-width=<width> Change output font width. If not given, the default is set to 6. This value will be used for computing aspect ratio. -y, --font-height=<height> Change output font height. If not given, the default is set to 10. This value will be used for computing aspect ratio. -b, --brightness=<brightness> Change image brightness. Default to 1.0. -c, --contrast=<contrast> Change image contrast. Default to 1.0. -g, --gamma=<gamma> Change image gamma. Default to 1.0. -d, --dither=<dither> Change dithering algorithm. This can be one of the following (default to fstein) : none : Nearest color ordered2 : Ordered 2x2 ordered4 : Ordered 4x4 ordered8 : Ordered 8x8 random : Random fstein : Floyd Steinberg -f, --format=<format> Change output format. This can be one of the following (default to ansi) : ansi : coloured ANSI caca : internal libcaca format utf8 : UTF8 with CR utf8cr : UTF8 with CRLF (MS Windows) html : HTML with CSS and DIV support html3 : Pure HTML3 with tables irc : IRC with ctrl-k codes bbfr : BBCode (French) ps : Postscript svg : Scalable Vector Graphics tga : Targa Image -h, --help Display help message and exit. -v, --version Display version of the program and exit. EXAMPLES
img2txt hello.jpg > hello.ans img2txt --width=40 --format=svg hello.jpg > tinyhello.svg NOTES
Setting both column and line count (using --width and --height) will let you choose the exact output size without taking aspect ratio in account. You must compile libcaca package with support of Imlib2 to be able to load a wide variety of image formats. Otherwise you will only be able to load regular BMP files. SEE ALSO
cacaview(1) AUTHOR
This manual page was written by Sam Hocevar <sam@hocevar.net> and Jean-Yves Lamoureux <jylam@lnxscene.org>. libcaca 2007-11-07 img2txt(1)

Check Out this Related Man Page

PSIGN(1)						      General Commands Manual							  PSIGN(1)

NAME
psign - produce a RADIANCE picture from text. SYNOPSIS
psign [ options ] [ text ] DESCRIPTION
Psign produces a RADIANCE picture of the given text. The output dimensions are determined by the character height, aspect ratio, number of lines and line length. (Also the character size if text squeezing is used.) If no text is given, the standard input is read. -cb r g b Set the background color to r g b The default is white (1 1 1). -cf r g b Set the foreground color to r g b The default is black (0 0 0). -dr Text reads to the right (default). -du Text reads upwards. -dl Text reads to the left (upside down). -dd Text reads downwards. -h cheight Set the character height to cheight. The default is 32 pixels. -a aspect Set the character aspect ratio (height/width) to aspect. The default value is 1.67. -x xsize Set the horizontal image size to xsize. Use with -y option (below) in place of the -h specification to control output image size directly. If the character aspect ratio (-a option, above) is non-zero, then one of the specified x or y output dimensions may be reduced to maintain this ratio. If direction is right (-dr) or left (-dl), then it is not necessary to give the -y option, since it can be computed from the character height (-h). -y ysize Set the vertical image size to ysize. Use with the -x option (described above). If direction is up (-du) or down (-dd), then it is not necessary to give the -x option, since it can be computed from the character height (-h). -s spacing Set the intercharacter spacing to spacing. The magnitude of this value is multiplied by the character height over the aspect ratio (ie. the character width) to compute the desired distance between characters in the output. The sign of the value, posi- tive or negative, determines how this ideal spacing is used in the actual placement of characters. If spacing is positive, then the overall width of the line will not be affected, nor will indentation of textual elements. Thus, the text format will be mostly unaffected. However, spacing between characters will reflect their relative size for a more natural appearance. If spac- ing is negative, characters will be squeezed together to meet the spacing critereon, regardless of how it might affect the format of the output. The default value for spacing is zero, which is interpreted as uniformly spaced characters. -f fontfile Load the font from fontfile. The default font is helvet.fnt EXAMPLE
To put a big "Hi!" on the terminal: psign -h 22 -a 1 -cb 0 0 0 -cf 1 1 1 Hi! | ttyimage ENVIRONMENT
RAYPATH path to search for font files AUTHOR
Greg Ward BUGS
The entire bitmap is stored in memory, which can be a problem for large and/or high-resolution signs. SEE ALSO
getinfo(1), pcompos(1), pfilt(1), ttyimage(1) RADIANCE
10/9/97 PSIGN(1)
Man Page