PIX2ASC(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

✨ PIX2ASC(1) ✨

okay so bestie, welcome to the pix2asc page β€” yes that's section 1 of the BRL-CAD manual, and yes it's about to be your new fave tiny little filter πŸŽ€

πŸ’– NAME πŸ’–

pix2asc β€” encode a binary color pixel file as portable ASCII πŸ’…

🌸 SYNOPSIS 🌸

pix2asc < file.pix > file.asc

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: pix2asc is literally just a simple filter, no cap. it takes a color pix(5) file from its binary form and converts it into a portable ASCII form. it reads the binary image from standard input and writes the ASCII representation to standard output. that's it, that's the whole vibe. and its companion tool asc2pix(1) does the reverse conversion, so they're giving matching-set energy 🫢

so the binary input is a sequence of three-byte tuples of unsigned chars, and those represent the red, green, and blue intensities of each pixel. iconic. the ASCII output has one RGB pixel per newline-terminated line, with each pixel written as six uppercase hexadecimal digits (two per color channel). so like FF00AB vibes, you know? ✨

this conversion is useful when transporting images to non-UNIX machines where a raw byte stream may not survive intact. lowkey a lifesaver for that πŸ’€

and listen β€” pix2asc takes no options. zero. none. it's a no-options main character and honestly? respect πŸ‘‘

πŸ’œ EXAMPLES πŸ’œ

Example 1. Convert a rendered image to ASCII for safe transport

rt -s 512 -o moss.pix moss.g all.g
pix2asc < moss.pix > moss.asc

so you render a 512x512 image of the all.g object with rt(1), then encode the resulting binary pix(5) file as ASCII so it can be safely moved across systems that might corrupt a raw byte stream. then later you restore the binary image with asc2pix < moss.asc > moss.pix. full circle moment, we love to see it 🌈

πŸ”₯ SEE ALSO πŸ”₯

go read those too, iykyk πŸ’–

πŸŽ€ AUTHOR πŸŽ€

BRL-CAD Team πŸ‘‘

This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.

πŸ“ BUG REPORTS πŸ“

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β€” fr fr, they wanna hear from you 🫢


bestie if a byte stream ever gets mangled in transit, you now know exactly who to call πŸ’…

and that's the whole page!! brought to you by BRL-CAD, PIX2ASC(1), mwah πŸ’‹βœ¨πŸ§š

πŸ“¦ where this page comes from