asc2pix — decode color pixel files
asc2pix, along with it's converse, pix2asc(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.
fb-pix input.pix
Generate a pix(5) file from framebuffer using fb-pix(1)
pix2asc < input.pix
> output.asc
On the local machine, convert the generated pix(5) file to ASCII
scp output.asc
remote:input.asc
Transfer the converted ASCII file to a remote machine
ssh remote "asc2pix < input.asc
> output.pix
"
On the remote machine, convert the ASCII file back to a pix(5) one
input.asc
should consist of one RGB pixel per newline-terminated line, with each pixel represented as six hexadecimal digits.
output.pix
will be a sequence of three-tuples of unsigned chars representing the red, green, and blue intensities for each pixel.