SUN-PIX(1)

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

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

okay so bestie, welcome to sun-pix(1), the BRL-CAD manual page that's about to turn your dusty old Sun screendump into something actually usable. grab a strawberry drink πŸ“ and let's go.


✨ NAME ✨

sun-pix β€” converts a Sun rasterfile (screendump) into a pix(5) or bw(5) image. literally that's the whole job and it does it flawlessly πŸ’…


✨ SYNOPSIS ✨

sun-pix [-b] [-H] [-i] [-P] [-v] [-C] [sun.bitmap]

πŸ¦‹ DESCRIPTION πŸ¦‹

so sun-pix takes a Sun rasterfile β€” like, the kind Sun's screendump(1) command spits out β€” and converts it into a pix(5) format image that gets written to standard output. no cap.

if you don't hand it an input file, it just reads the rasterfile from standard input. and the output dimensions? they match the input image exactly, obviously. matching energy only πŸ’–

here's the range it fucks with: sun-pix handles 1-bit and 8-bit (color-mapped) rasterfiles, in both raw (RT_STANDARD) and run-length encoded (RT_BYTE_ENCODED) forms. and the input must be in Sun ("network", big-endian) byte order regardless of the host β€” periodt, that's not negotiable, the byte order is not up for discussion πŸ™ˆ

⚠️ important bestie: to avoid corrupting a terminal, sun-pix refuses to write binary output to a tty. so redirect standard output to a file, or pipe it into another tool like pix-fb(1). do not raw-dog the terminal with binary data, i'm begging 😭

🌸 OPTIONS 🌸

  • -b β€” write a bw(5) (single-channel grayscale) image instead of the default three-channel pix(5) image. one channel, all vibes.
  • -H β€” print only the image dimensions and exit, without processing the pixel data. the size comes out as a pair of command-line options (e.g. -w1152 -n900) that you can feed directly into other brlcad(1) tools such as pix-fb(1). and this is the one mode allowed to write to a terminal β€” it's the main character mode πŸ‘‘
  • -i β€” invert the image, exchanging black for white. by default a Sun image is black on a white background; -i gives you white on black, which is often better for overlays composited with pixmerge(1) on top of color images. aesthetic flip πŸ¦‹
  • -P β€” treat the input as a "pure" 1-bit bitmap with no Sun rasterfile header. the first bit processed is the most significant (left-most) bit of each byte. no header, no problem.
  • -v β€” verbose. prints all the rasterfile header fields to standard error to help you debug. she's telling you everything πŸ’€
  • -C β€” output the image color map as text (index and RGB values) instead of the raster image. giving data, not pixels.

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Display a screendump on a framebuffer

sun-pix screen.ras | pix-fb -w1152 -n900

convert a Sun rasterfile and pipe the resulting pix(5) stream straight onto a framebuffer with pix-fb(1). iconic, no intermediate files, straight to the screen ✨

Example 2. Auto-size the framebuffer from the header

sun-pix screen.ras > screen.pix
pix-fb $(sun-pix -H screen.ras) screen.pix

first command writes the converted image out to a file. second one uses -H to read the image dimensions back out as -w/-n options, so pix-fb(1) is sized to match without hard-coding the resolution. she's self-sufficient, she doesn't need you guessing numbers πŸ’…

Example 3. Make a white-on-black overlay

sun-pix -i -b logo.ras > logo.bw

invert a 1-bit logo and emit a bw(5) image, producing a white-on-black mask that's perfect for compositing over a color image with pixmerge(1). chef's kiss πŸŽ€


πŸ’€ BUGS πŸ’€

24-bit (true color) rasterfiles are not supported. like, at all. don't come for her, she simply does not do true color πŸ™ˆ


🫢 SEE ALSO 🫢

brlcad(1), pix-fb(1), pixmerge(1), pix(5), bw(5)


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” the whole squad πŸ’œ


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 β€” the inbox is open, bestie, tell them everything πŸ“¬


okay that's the whole page, you ate that 🌈 and for the sign-off: this gorgeous thing is BRL-CAD's work, page SUN-PIX(1), and it's current and cute and ready for you β€” now go convert something πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from