DPIX-PIX(1)
π 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.
β COPYRIGHT β
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
- 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