DPIX-PIX(1)

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

πŸ’– DPIX-PIX β€” the BRL-CAD glow-up page πŸ’–

okay bestie, welcome to dpix-pix, a little BRL-CAD icon that takes your fancy double-precision image file and turns it into a plain old pix file. i'm gonna walk you through it, no cap.


✨ NAME ✨

dpix-pix β€” converts a double-precision dpix file to a pix file. that's the whole gig. it's giving "glow-up translator" πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

dpix-pix file.dpix > file.pix

like, that's literally it. one file in, bytes out to stdout. slay.


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: dpix-pix takes a double-precision image (dpix) file and converts it into a pix(5) format file. periodt.

but the way it does it? two passes, bestie. it scans the entire input file once to find the minimum and maximum sample values β€” like a little recon mission πŸ” β€” then it reads the file a second time and linearly maps each value from that [min, max] range onto the 8-bit range of 0 to 255, writing the resulting bytes to standard output. iconic behavior honestly.

the discovered minimum and maximum? those get reported on standard error, so you can peek at them without them crashing your pixel party 🫢

⚠️ heads up: because the input has to be read twice, the data is taken from a named file β€” not from standard input. so don't pipe it in, bestie, it's not that kind of program. also the output is binary, and it will straight up refuse to run if you direct it to a terminal. yes, literally refused. it's protecting you 😭

🌸 EXAMPLES 🌸

Example 1. Convert a dpix file and view the result

dpix-pix image.dpix > image.pix
pix-fb -w 512 -n 512 image.pix

so what's happening here? dpix-pix converts the double-precision image image.dpix into a pix(5) file, auto-scaling its values into the 0-255 range β€” automatic, no manual scaling needed, we love a self-sufficient queen πŸ‘‘ β€” and then pix-fb(1) displays the result on a framebuffer. the reported min/max on standard error tell you the exposure range used for the conversion. yep, that's what those numbers were for πŸŽ€


πŸ’œ SEE ALSO πŸ’œ

go read those too, iykyk πŸ“š


🌈 AUTHOR 🌈

the BRL-CAD Team. legends, fr fr.


This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.


πŸ“ BUG REPORTS πŸ“

found a bug? a problem? something acting sus? Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β€” they wanna hear from you, bestie πŸ’Œ


and that's the page! brought to you by BRL-CAD, DPIX-PIX(1) β€” go convert something cute βœ¨πŸ’–

πŸ“¦ where this page comes from