PIX-PPM(1)
π pix-ppm β the glow-up page π
ok so bestie, welcome to pix-ppm(1) from BRL-CAD β genuinely one of the most useful little converters in the whole toolbox, no cap. It takes your crusty old BRL-CAD PIX or BW image and turns it into a shiny PPM/PGM that literally any image tool will understand. let's get into it π«Ά
β¨ SYNOPSIS β¨
pix-ppm [-a] [-# bytes_per_pixel] [-s squaresize] [-w file_width] [-n file_height] [-o file.ppm] [file.pix] [> file.ppm]
π DESCRIPTION π
okay so here's the vibe: pix-ppm converts a pix(5) format image (or a bw(5) one, those are the grayscale girlies) into a Netpbm PPM/PGM format image. it's giving translator, it's giving bilingual icon. π
the deets you actually need:
- three-byte-per-pixel RGB input β gets written as a binary PPM (
P6) - single-byte-per-pixel input β gets written as a binary PGM (
P2)
input gets read from the named file.pix, or β if you don't hand it a file β from standard input. output goes to standard output by default, which is honestly so convenient.
β οΈ important caveat, bestie, do not skip this: PIX and BW files carry no embedded dimensions. like, none. zero. the file genuinely does not know how big it is. π so you must supply the size of the input yourself (the default is512x512) using-s,-w/-n, or you let it figure things out automatically with-a. your call, but pick one.
π OPTIONS π
-aβ autosize the input file! it infers the image width and height from the file length. so clever of it. β¨ but heads up: this only actually works when you're reading from a named file, not from standard input. stdin could never.-#bytes_per_pixel β set how many bytes per pixel the input has. gotta be3(that's RGB, and yes, it's the default) or1(grayscale). those are the only two options, pick one. π-ssquaresize β set both the input width and height to squaresize pixels. square era, we love to see it. π-wfile_width β set just the input width to file_width pixels.-nfile_height β set just the input height to file_height scanlines.-ofile.ppm β write the image to the named output file. and here's the tea: if standard output is also redirected or piped,pix-ppmwrites the same image to both destinations. double the slay. π also,pix-ppmrefuses to write binary image data to a terminal β it's protecting you, honestly, because that would look like cursed soup all over your screen. ππ
π¦ EXAMPLES π¦
Example 1. Convert an autosized PIX rendering to PPM
pix-ppm -a render.pix -o render.ppm
reads render.pix, infers its dimensions from the file size (thank you -a, main character energy), and writes a binary PPM file render.ppm β perfect for viewing or importing into all the common image tools you already have.
Example 2. Render and convert in a single pipeline
rt -s 1024 -o /dev/stdout model.g component | pix-ppm -s 1024 > component.ppm
pipes a 1024x1024 rt(1) raytrace directly into pix-ppm, producing a PPM image without writing an intermediate PIX file to disk. no middleman, no disk clutter, just vibes. π₯
πΈ SEE ALSO πΈ
brlcad(1), rt(1), pix-png(1), pix-bw(1), bw-pix(1), pix-fb(1), pix(5), bw(5)
like a whole friend group of converters, honestly. iykyk. π
π AUTHOR π
BRL-CAD Team β legends, every one of them π
β COPYRIGHT β
this software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory. periodt. π
π§ BUG REPORTS π§
found a bug? a problem? something acting sus? reports should be submitted via electronic mail to devs@brlcad.org β they'd genuinely love to hear from you, bestie π
and that's the whole page! π this beauty comes to you from BRL-CAD β source/version PIX-PPM(1) β dated 2007-08-20? no wait, i'm kidding, the date's right there in the footer with the manual, so go check it. love u, go convert some pixels π«Άβ¨
π¦ 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