FBSTRETCH(1)
π FBSTRETCH(1) β the BRL-CAD glow-up manual π
okay so bestie, you found fbstretch(1) from the BRL-CAD manual set, and honestly? she's a little icon. let's get into it π
β¨ NAME β¨
fbstretch β stretch a frame buffer image π«Ά (yes, that's it, that's the whole job, and she does it flawlessly)
β¨ SYNOPSIS β¨
fbstretch [-a] [-v] [-s _size_] [-w _width_] [-n _height_] [-f _in_fb_]
[-x _x_scale_] [-y _y_scale_]
[-S _size_] [-W _width_] [-N _height_] [[-F] _out_fb_]
β¨ DESCRIPTION β¨
so fbstretch expands or compresses a frame buffer image, and she can do it horizontally, vertically, or both β like, no cap, both directions are on the table π
. the image scaling origin (the fixed point) is the lower left-hand corner of the display, periodt.
when you're expanding (scale factor greater than 1), pixels are simply replicated. copy-paste behavior, literally. but when you're compressing (scale factor less than 1), pixel averaging is performed β unless you explicitly request sampling with the -a option. so the vibes change depending on which direction you're going lmao πΈ.
the default input image size is 512 by 512. explicitly specified sizes override the default, and if the actual input image size is smaller than what you requested, the actual size will be used (she's not gonna invent pixels for you, bestie π). if not specified, the requested output frame buffer size will be the stretched revised input size β it just follows from the math, iykyk.
now, if there are margins within the requested output beyond the stretched image, they will be cleared to background π§. but if the stretched image would extend beyond the requested output size, it will be clipped to fit β even if there is room for it in the actual frame buffer. yeah. she said no. π actual sizes depend on details of specific frame buffers, so like, check your own situation.
β¨ OPTIONS β¨
-f input_image_nameβ inputs the image to be displayed from the specified frame buffer orpix(5)file, instead of modifying the output frame buffer in place. β οΈ heads up: this option may not work if input and output frame buffers are the same device. awkward.-s input_square_sizeβ specifies input image width and height. two birds, one flag π¦-w input_widthβ specifies input image width.-n input_heightβ specifies input image height.-aβ (no averaging) specifies that output pixels will be sampled from the input, instead of being computed by averaging RGB values. sampling girlies rise π₯-vβ (verbose) causes actual sizes and scale factors used to be printed on the standard error output. she'll tell you exactly what she did π-x horizontal_scale_factorβ scales the image by the specified factor in the horizontal direction; the default is the ratio of requested output to input widths, if specified, otherwise 1.-y vertical_scale_factorβ scales the image by the specified factor in the vertical direction; the default is the ratio of requested output to input heights, if specified, otherwise 1.-S output_square_sizeβ specifies output frame buffer width and height.-W output_widthβ specifies output frame buffer width.-N output_heightβ specifies output frame buffer height.-F output_frame_buffer_nameβ outputs to the specified framebuffer instead of the one specified by theFB_FILEenvironment variable. and here's the cute part: if this is the last option, the-Fprefix is optional π (she's flexible like that)-h,-?β print a usage message and exit.
β¨ DISCUSSION β¨
real talk for a sec: pixel averaging may be meaningless for some images or color maps β in which case sampling should be specified. images of the Mandelbrot set are a good example of this π. so like, know your image, bestie.
β¨ EXAMPLES β¨
Example 1. Enlarge a 320x200 image to fill a 1280x1024 framebuffer
$ gif-fb image.gif
$ fbstretch -w 320 -n 200 -W 1280 -N 1024
ate. no crumbs. πβ¨
β¨ SEE ALSO β¨
gif-fb(1), pixscale(1), libdm(3), pix(5) β go read those too, they're the friend group π«Ά
β¨ DIAGNOSTICS β¨
error messages are intended to be self-explanatory. she's not cryptic, she's just honest π
β¨ AUTHOR β¨
Douglas A. Gwyn, BRL/VLD-VMB β the main character who made this happen π
β¨ COPYRIGHT β¨
this software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory. iconic and legally protected, love that for her π
β¨ BUG REPORTS β¨
reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β don't suffer in silence, tell the devs π¦
ngl if something looks weird, it's probably the frame buffer being specific, not you. actual sizes depend on details of specific frame buffers, remember? π
and that's the whole page, bestie β brought to you by the BRL-CAD manual set, FBSTRETCH(1), dated in that gorgeous little 1989-2026 copyright window. slay, go stretch some 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