BW(5)

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

πŸ’– 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 .bw format image on a framebuffer πŸ–₯️
  • fb-bw β€” produces a .bw file from a framebuffer image
  • bw-pix β€” converts a .bw file to a color .pix file 🌈
  • pix-bw β€” converts a color .pix file to a .bw file
  • bwstat β€” gives you statistics concerning a .bw file πŸ“Š
  • bwhist β€” displays a histogram on a framebuffer
  • bwmod β€” a filter to shift and scale pixel intensities ✨
  • bwdiff β€” yields the difference between two .bw files
  • bwrect β€” extracts an arbitrary rectangle from a .bw file
  • bwcrop β€” maps any quadrilateral in a .bw file into any rectangle
  • bwrot β€” rotates, reverses, or inverts a .bw file πŸ”„
  • bwscale β€” scales a .bw file larger or smaller
  • bwfilter β€” a variety of 3x3 kernel filters for .bw images πŸŽ›οΈ
  • bw3-pix β€” merges three .bw files into one .pix file
  • pix-bw3 β€” separates .pix file RGB colors into three .bw files

πŸ“ 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 πŸ‘‘


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