BW-FB(1)
π bw-fb β the BRL-CAD one (bw-fb(1)) β¨
okay so real talk, this one is so useful and nobody talks about it. it's bw-fb, it lives in the BRL-CAD manual, and it's literally just "put my black-and-white picture on a screen." main character energy for a command-line tool, honestly.
πΈ NAME πΈ
bw-fb β display a black and white bw image on a framebuffer πΌοΈ
π SYNOPSIS π
bw-fb [-aiczRGB] [-F framebuffer] [-s squarefilesize] [-w file_width] [-n file_height] [-S squarescrsize] [-W scr_width] [-N scr_height] [-x file_xoff] [-y file_yoff] [-X scr_xoff] [-Y scr_yoff] [infile.bw]
like, yes, that's a lot of flags. breathe. we'll get through them together bestie π«Ά
β¨ DESCRIPTION β¨
so bw-fb reads a bw(5) format file β and if you don't hand it a filename it'll just read from standard input, no big deal β and then it displays that image on the framebuffer you've currently got selected. π
the environment variable FB_FILE tells it which framebuffer is "the one" right now; peep brlcad(1) if you need the deets on that. β¨
π OPTIONS π
-Fframebuffer β okay so this one lets you explicitly say which framebuffer to use. no guessing, no vibes-based selection, you just tell it. π-aβ makes the program attempt to autosize. it consults a table of common image sizes, and if any of them match the size of your input file, then the width and height values tied to that size get used. and here's the default tea: without this, the bw file (and, automatically, the requested framebuffer size) is assumed to be512x512pixels. π¦-iβ outputs the image from top to bottom. customarily, bw files are stored bottom to top, so this inverts the image. yes, that's the whole point. π-cβ clears the screen before the image is displayed. the default behavior is to just overwrite the current image with the new one without clearing the screen. so if you want a clean slate, this is your girl. β¨-zβ zoom and center on the image being displayed so it fills the display area. it's giving "make it fit, make it cute." π₯-R,-G,-Bβ select individual color planes (red, green, or blue, respectively) into which the image will be loaded. one or more can be given, so go off. by default all three colors are written with the bw pixel value. π-wfile_width β specifies the width of each scanline in the input file, in pixels.-nfile_height β specifies the height in scanlines of the input file.-ssquarefilesize β sets both the file width and file height to the given size. one number, two dimensions, so efficient. π-Wscr_width β specifies the width of the display device.-Nscr_height β specifies the height of the display device.-Ssquarescrsize β sets both the display width and display height to the given size. and if no display dimensions are provided, the display device uses the dimensions of the input file. π-xfile_xoff,-yfile_yoff β offset into the file by the given amounts. the coordinate system for these offsets is first quadrant, with the origin at the lower left corner of the image. β-Xscr_xoff,-Yscr_yoff β offset onto the screen by the given amounts. the coordinate system for these offsets is first quadrant, with the origin at the lower left corner of the image. πΈ
π¦ FORMAT π¦
a bw(5) file contains sequences of pixels. each pixel is stored as one unsigned char. the first pixel in a bw file is the lower left corner of the image. the pixels proceed from left-to-right across each scanline, with scanlines being written from the bottom to the top of the image. π§
ngl the bottom-to-top thing trips everyone up at least once. you're not broken, the format is just like that. π
π EXAMPLES π
these examples show you how to display a bw format file on a framebuffer β including displaying a specific size, autosizing, and displaying only a specific color plane. slay. π₯
Example 1. Displaying a 1024x1024 bw file
$ bw-fb -s 1024 image.bw
displays the 1024x1024 file image.bw on the currently selected framebuffer. π
Example 2. Autosizing and zooming an image
$ bw-fb -a -z image.bw
attempts to automatically determine the image dimensions from the file size of image.bw and displays it, zooming in and centering it to fill the display area. π
Example 3. Displaying an image only in the red color plane
$ bw-fb -R image.bw
displays image.bw in the red color plane of the framebuffer, leaving the green and blue planes unaffected. π
π SEE ALSO π
brlcad(1), fb-bw(1), pix-fb(1), bw(5)
π 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
fr fr if something's cursed, tell them. they want to know. π«Ά
okay that's the whole page, bestie. this little icon is part of the BRL-CAD set β BW-FB(1) β and yeah, that's the sign-off. go display 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