PIXEMBED(1)
π pixembed(1) β a BRL-CAD moment β¨
okay bestie so real talk, this is pixembed from the BRL-CAD fam, and it's literally the glow-up tool for your pix images π
β¨ NAME β¨
pixembed β embeds a pix image inside a bigger frame by replicating the border pixels outward (no boring black padding here, we ate π
)
πΈ SYNOPSIS πΈ
pixembed [-b border_inset] [-s squareinsize] [-w inwidth] [-n inheight]
[-S squareoutsize] [-W outwidth] [-N outheight] [in.pix] > out.pix
π¦ DESCRIPTION π¦
So pixembed reads a 3-byte/pixel RGB pix(5) image and centers it inside a larger output pix(5) image. and instead of just slapping black in the margin like some kind of amateur, it replicates the boundary pixels of the input outward to fill the whole entire margin. no cap, it's giving mirror-core πͺβ¨
okay so here's the tea: the extreme edge pixels of an image are sometimes noisy or degraded π so you can bump up the border_inset and the replicated color gets sampled from a row or column slightly inside the actual edge of the input. lowkey genius.
if you don't hand it an in.pix, it reads the image from standard input β and the embedded result always goes to standard output, no exceptions bestie. both input and output dimensions default to 512x512 π
β οΈ the rules: the output size must be greater than or equal to the input size, and the border inset must be smaller than the input width. them's the vibes, don't fight them.
π OPTIONS π
-b border_insetβ the inset, in pixels, from the actual image edge where the replicated border color gets sampled. default is0, meaning the exact edge pixels get replicated. iykyk π«Ά-s squareinsizeβ sets both the width and the height of the input image tosquareinsizepixels. one number, two jobs, main character energy π-w inwidthβ sets the width of the input image to inwidth pixels (default512).-n inheightβ sets the height of the input image to inheight pixels (default512).-S squareoutsizeβ sets both the width and the height of the output image tosquareoutsizepixels.-W outwidthβ sets the width of the output image to outwidth pixels (default512).-N outheightβ sets the height of the output image to outheight pixels (default512).
π EXAMPLES π
Example 1. Embed a 512x512 image into a 1024x1024 frame
pixembed -s 512 -S 1024 < input.pix > output.pix
this centers the 512x512 input inside a 1024x1024 image, replicating the input's edge pixels to fill the surrounding border, then writes the bigger image to output.pix. slay π
Example 2. Generate a clean matte for compositing
pixembed -w 640 -n 480 -W 800 -N 600 -b 4 render.pix | pix-png -w 800 -n 600 > matte.png
this one embeds a 640x480 render into an 800x600 frame, sampling the border color from 4 pixels inside the edge to dodge those noisy outer rows π, and then pipes the whole thing straight into pix-png(1) to produce a PNG ready for compositing. iconic behavior fr fr π₯
π§ SEE ALSO π§
brlcad(1), pixscale(1), pixmatte(1), pixbustup(1), pix-png(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 β yes bestie, actual email, go tell them everything π«Ά
and that's the whole page!! brought to you by the BRL-CAD girlies β BRL-CAD, no cap, catch you in the next group chat ππβ¨
π¦ 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