PIX2ASC(1)
β¨ 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 π
β COPYRIGHT β
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
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms