pix2asc, asc2pix — encode and decode color pixel files
pix2asc and asc2pix are simple filters which convert color pix(5) files from their binary form to a portable ASCII form, and back. pix2asc reads the binary file on standard in and writes ASCII on standard out. asc2pix does the reverse.
The binary file consists of a sequence of three-tuples of unsigned chars representing the red, green, and blue intensities for each pixel. The ASCII version of the file has one RGB pixel per newline-terminated line, with each pixel represented as six hexadecimal digits.
files between UNIX systems
via tape (see
or via network (see
this conversion to ASCII is unnecessary,
as all UNIX files are byte streams, regardless of the underlying hardware.
However, when transporting images to non-UNIX machines,
these tools are invaluable.
can directly generate the ASCII form of an image file using the
flag, allowing it to be easily used on non-UNIX systems.
This software is Copyright (c) 1989-2016 by the United States Government as represented by U.S. Army Research Laboratory.