pix2asc — encode color pixel files into ASCII Hex files
pix2asc, along with it's converse, asc2pix(1), are are simple filters which convert color pix(5) files from their binary form to a portable ASCII form, and back.
When moving pix(5) files between UNIX systems via tape (see tar(1) and cpio(1)) or via network (see rcp(1) and ftp(1)), 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.
Sample usage may go like:-
asc2pix <
input.asc
>output.pix
pix-pngoutput.pix
>file.png
Edit the files
png-pixfile.png
>input.pix
pix2asc <input.pix
>output.asc
input.pix
should consist of a sequence of three-tuples of unsigned chars representing the red, green, and blue intensities for each pixel.
output.asc
will have one RGB pixel per newline-terminated line, with each pixel represented as six hexadecimal digits.