PIX-SUN(1)
π 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~ π¨-ssquaresize β Sets both the input width and height to squaresize pixels. One number, two dimensions, we're efficient like that β-wwidth β Sets the input width to width pixels (and yes, it must be even, don't test me on this π).-nheight β 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 π
π 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 β 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
- 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