PIXBORDER(1)
PIXBORDER(1) π β¨
okay so this is the BRL-CAD manual page for pixborder, and bestie, it is lowkey iconic: it takes a pix stream, finds colored regions, and traces their edges like itβs doing main-character eyeliner. π
πΈ NAME πΈ
pixborder β add a 1-pixel-wide border to regions of a specified color. yes, exactly what it says on the tin, no cap. π
β¨ SYNOPSIS β¨
pixborder [-a] [-b 'R G B'] [-e 'R G B'] [-i 'R G B'] [-t 'R G B']
[-B 'H S V'] [-E 'H S V'] [-I 'H S V'] [-T 'H S V']
[-x _left_edge_] [-y _bottom_edge_] [-X _right_edge_] [-Y _top_edge_]
[-s _squaresize_] [-w _file_width_] [-n _file_height_] [_file.pix_]
π¦ DESCRIPTION π¦
pixborder reads a stream of pix(5) data, finds maximal contiguous regions of a specified interior color, and writes out pix(5) data where every pixel on the boundary of such a region is replaced by a border color. It outlines colored regions β it does not draw a frame around the whole image, so donβt come for it with that expectation, okay? π
With no input file given, data is read from standard input. Output always goes to standard output. periodt. π
Whether a pixel is on a boundary depends on the interior and exterior colors. The default interior color is 255 255 255 (white), and the default exterior color is 1 1 1. If both or neither color is specified, a pixel is on the boundary when it has the interior color and at least one of its four neighbors (left, right, above, below) has the exterior color. If only one color is specified, a pixel is on the boundary when it matches (or, for an exterior-only specification, does not match) that color and at least one neighbor differs accordingly. iykyk. π«Ά
Colors may be given in RGB (channels in {0..255}) or HSV (with H in [0, 360) and S, V in [0, 1]). A symmetric per-channel tolerance (-t or -T) lets nearby colors be treated as the nominal interior or exterior color. itβs giving βclose enough countsβ but in a mathematically specified way. β¨
π OPTIONS π
-aβ Autosize: guess the input dimensions from the file (only works for a namedpix(5)file, not standard input). stdin girlies, this one is not for you. π-b 'R G B'β Set the border color in RGB. Default is1 1 1.-B 'H S V'β Set the border color in HSV.-e 'R G B'β Set the exterior (background) color in RGB. Default is1 1 1.-E 'H S V'β Set the exterior (background) color in HSV.-i 'R G B'β Set the interior (region) color in RGB. Default is255 255 255.-I 'H S V'β Set the interior (region) color in HSV.-t 'R G B'β Set a symmetric per-channel RGB tolerance for color matching. Default is0 0 0.-T 'H S V'β Set a symmetric per-channel HSV tolerance for color matching.-s squaresizeβ Set both the input width and height tosquaresizepixels.-w file_widthβ Set the input width in pixels. Default is512.-n file_heightβ Set the input height in pixels. Default is512.-x left_edgeβ Restrict changes to pixels at or to the right of this column. Default is0.-X right_edgeβ Restrict changes to pixels at or to the left of this column. Default is the rightmost column.-y bottom_edgeβ Restrict changes to pixels at or above this row. Default is0.-Y top_edgeβ Restrict changes to pixels at or below this row. Default is the topmost row.
π₯ EXAMPLES π₯
Example 1. Outline red regions in yellow
pixborder -i '255 0 0' -b '255 255 0' -t '40 40 40' scene.pix > outlined.pix
Outlines every red region (red 255 0 0, with a tolerance of 40 per channel to catch anti-aliased edges) by recoloring its boundary pixels yellow. slay. π
Example 2. Draw a multi-pixel-wide border with a pipeline
pixborder -i '255 0 0' -b '0 0 0' scene.pix | \
pixborder -i '255 0 0' -b '0 0 0' > thick.pix
pixborder only thickens by one pixel per pass, so chaining several invocations in a pipeline widens the border. To build a border of constant-thickness bands of different colors, produce all segments of an outer layer before any of the next inner layer. pipeline bestie behavior, fr fr. π§
π SEE ALSO π
brlcad(1), pix-fb(1), pixfilter(1), pix(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
BRL-CAD β’ PIXBORDER(1) β’ copyright 1989-2026 β thatβs the footer sign-off, bestie, mwah! πβ¨
π¦ 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