PIX-PPM(1)

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

πŸ’… 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 is 512x512) 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 be 3 (that's RGB, and yes, it's the default) or 1 (grayscale). those are the only two options, pick one. πŸ’…
  • -s squaresize β€” set both the input width and height to squaresize pixels. square era, we love to see it. πŸŽ€
  • -w file_width β€” set just the input width to file_width pixels.
  • -n file_height β€” set just the input height to file_height scanlines.
  • -o file.ppm β€” write the image to the named output file. and here's the tea: if standard output is also redirected or piped, pix-ppm writes the same image to both destinations. double the slay. πŸ’– also, pix-ppm refuses 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 πŸ‘‘


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