PIX-SUN(1)

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

πŸ’… PIX-SUN(1) β€” the BRL-CAD glow-up page

okay so bestie, welcome to pix-sun, part of the BRL-CAD manual fam. This is the little tool that takes your boring PIX image and turns it into a Sun rasterfile. Let's get into it ✨


🌸 NAME 🌸

pix-sun β€” literally converts a BRL-CAD PIX image into a Sun rasterfile. That's it, that's the whole job, and it does it slayfully πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

pix-sun [-d] [-s squaresize] [-w width] [-n height] < file.pix > file.ras

Reads from stdin, writes to stdout β€” classic pipe girlie behavior, we love to see it 🫢


✨ DESCRIPTION ✨

So here's the tea: pix-sun reads a pix(5) format image from standard input and writes out an equivalent Sun Microsystems "rasterfile" to standard output. Iconic. Effortless. No notes.

The output is a standard (uncompressed) 8 bit deep rasterfile, and it's carrying an equal-RGB colormap of 256 entries β€” which is a 6x6x6 color cube plus extra ramps for the primary colors and the grey levels. Very demure, very mindful palette construction πŸ’…

Each 24 bit input pixel gets quantized to the nearest colormap index, and the scanline order is reversed to account for the differing origin conventions of PIX and rasterfile images. Like, they just don't agree on where "up" is and honestly? relatable. πŸ™ˆ

Heads up bestie: the input width must be even. And when no dimensions are supplied, the image is assumed to be 512x512 pixels. No cap.

πŸ”₯ OPTIONS πŸ”₯

  • -d β€” Dither the input while quantizing to 8 bits. This spreads the quantization error around so it better approximates the original colors β€” at the cost of some added noise. It's giving ~artistic~ 🎨
  • -s squaresize β€” Sets both the input width and height to squaresize pixels. One number, two dimensions, we're efficient like that ⭐
  • -w width β€” Sets the input width to width pixels (and yes, it must be even, don't test me on this πŸ’€).
  • -n height β€” Sets the input height to height scanlines.

πŸ¦‹ EXAMPLES πŸ¦‹

Example 1. Convert a non-square rendering to a rasterfile

pix-sun -w 1024 -n 768 < render.pix > render.ras

Converts a 1024x768 PIX image produced by rt(1) into an 8 bit Sun rasterfile, preserving the image dimensions. Non-square? Doesn't matter, she's versatile πŸ’œ

Example 2. Dither a high-color image to reduce banding

rt -o scene.pix -s 512 scene.g all.g
pix-sun -d -s 512 < scene.pix > scene.ras

Renders a 512x512 image with rt(1) and then converts it with dithering enabled β€” which softens out the visible banding that shows up when you reduce 24 bit color down to that fixed 256-entry colormap. Honestly the before/after is giving main character energy πŸ‘‘


🌈 SEE ALSO 🌈

brlcad(1), rt(1), pix(5) β€” 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 β€” pls be nice, they're doing their best 🫢


okay that's the whole page bestie, mwah πŸ’‹ this one's brought to you by BRL-CAD β€” the manual is PIX-SUN(1), the source is BRL-CAD, and the footer just says BRL-CAD and nothing else so that's all I'm giving you. periodt βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from