BW(5)
π bw(5) β the Black and White image file format π
okay so bestie, welcome to bw(5), the manual page for the bw Black and White image file format and its little utility family π this is from the BRL-CAD docs and honestly it's giving vintage-but-iconic, so let's get into it β¨
πΈ NAME πΈ
bw β the Black and White image file format, plus all the utilities that hang out with it π«Ά
β¨ FORMAT β¨
okay so a bw file is literally just a sequence of pixels, no cap. each pixel is stored as one unsigned char, which means its intensity runs from 0 (black, the mood) all the way to 255 (white, the glow-up) π
the first pixel in a bw file is the lower left corner of the image β yes, bottom-left, that's the main character. then the pixels go left-to-right across each scanline, and the scanlines get written from the bottom to the top of the image. so it's bottom-up energy, periodt π¦
by convention, bw images are usually square, which is slay because it means you can figure out their dimensions from the file size alone. if they're not square though, often the only thing a program reading the file needs to know is the file width. history left us with two "standard" sizes β 512x512 and the "higher" 1024x1024 π and a common practice for other file sizes is to just put the file width in the filename. iykyk.
at some time in the future bw files will probably get self-typing headers so that parameters like their size can be automatically determined by programs. future us is gonna eat, fr fr π₯
π§ UTILITIES π§
bestie there are so many of these little guys, and they all ate:
bw-fbβ displays a.bwformat image on a framebuffer π₯οΈfb-bwβ produces a.bwfile from a framebuffer imagebw-pixβ converts a.bwfile to a color.pixfile πpix-bwβ converts a color.pixfile to a.bwfilebwstatβ gives you statistics concerning a.bwfile πbwhistβ displays a histogram on a framebufferbwmodβ a filter to shift and scale pixel intensities β¨bwdiffβ yields the difference between two.bwfilesbwrectβ extracts an arbitrary rectangle from a.bwfilebwcropβ maps any quadrilateral in a.bwfile into any rectanglebwrotβ rotates, reverses, or inverts a.bwfile πbwscaleβ scales a.bwfile larger or smallerbwfilterβ a variety of3x3kernel filters for.bwimages ποΈbw3-pixβ merges three.bwfiles into one.pixfilepix-bw3β separates.pixfile RGB colors into three.bwfiles
π FILES π
file.bw
that's it, that's the file π
π SEE ALSO π
brlcad(1), pix(5), and above named programs π«Ά (yes, the whole squad)
π 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 β like, don't suffer in silence bestie, tell them π
mwah, that's the whole page π¦ this was BW(5) from BRL-CAD, and this little rewrite is living in the same 1989-2026 copyright era energy β go forth and slay your pixels β¨π
π¦ 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