PIXSHRINK(1)
π
PIXSHRINK(1) β the pixshrink page, bestie edition β¨
okay so real talk, this is the manual page for pixshrink from the BRL-CAD fam, and it's genuinely one of the most useful little gremlins in the toolbox. let's get into it π«Ά
πΈ NAME πΈ
pixshrink β shrink a color pix file by an integer factor
like, exactly what it says on the tin, no cap π
β¨ SYNOPSIS β¨
pixshrink [-u] [-w in_width] [-n in_height] [-s squaresize] [-f shrink_factor] [infile.pix] > outfile.pix
she takes a pix, she makes it smol, she sends it out. iconic behavior honestly π
π¦ DESCRIPTION π¦
okay so pixshrink reads a color pix(5) format image of given dimensions and produces a smaller, scaled-down version of it. the output gets reduced by an integer shrink_factor in both dimensions, which lowkey makes pixshrink the logical opposite of pixinterp2x(1). they're giving enemies-to-lovers, iykyk π
input is read from infile.pix if you give it one β otherwise she'll read from standard input. the shrunk image goes to standard output. simple as that, bestie π
the input width and height (in pixels) are specified with -w and -n. both default to 512 when you don't say anything, which is a whole vibe. here's the thing though: the entire image is read into memory, and then scaled. so don't come at her with a gigapixel file and expect magic π
by default pixshrink uses boxcar averaging β each output pixel is computed as the average of a shrink_factor by shrink_factor block of input pixels. that's the pretty, smooth, well-behaved option. the -u option instead selects faster undersampling (point sampling), which is exactly as unbothered and chaotic as it sounds β
π OPTIONS π
-win_widthβ set the input image width in pixels (default512). she needs to know how wide you are π-nin_heightβ set the input image height in scan lines (default512). how tall, bestie? π-ssquaresizeβ set both the input width and height tosquaresizepixels (shorthand for a square image). one number, two dimensions, efficiency queen π-fshrink_factorβ set the integer scaling factor (default2). each output dimension becomes1/shrink_factorof the input. must be greater than1β so1is not the move, and neither is0, don't even try it π-uβ use image undersampling (point sampling) rather than the default boxcar averaging. faster, rougher, main character energy π₯-h,-?β print a usage message and exit. the classic "help me help you" combo π«Ά
π EXAMPLES π
Example 1. Halve a 1024x1024 image
pixshrink -s 1024 image.pix > thumb.pix
reads a 1024x1024 pix(5) image and writes a 512x512 version using the default shrink factor of 2 and boxcar averaging. half the pixels, all the slay β¨
Example 2. Generate a quarter-size thumbnail and view it
pixshrink -w 1280 -n 720 -f 4 render.pix | pix-fb -w 320 -n 180
shrinks a 1280x720 rendering down to 320x180 (that's a factor of 4, mwah) and pipes the result straight to pix-fb(1) for a quick preview on the framebuffer β without writing an intermediate file. the way that pipe just works ππ
π BUGS π
bestie. listen. if the input dimensions are not evenly divisible by the shrink_factor, incorrect or garbled output is produced. not "a little off", not "slightly cursed" β garbled. so do your math before you run her, fr fr π
π SEE ALSO π
brlcad(1), pixinterp2x(1), pixscale(1), pixcrop(1), pixrect(1), pix-fb(1), pix(5)
the whole friend group, honestly β go say hi π¦
π§ AUTHOR π§
BRL-CAD Team
π COPYRIGHT π
this software is Copyright (c) 1990-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
okay that's the whole page, bestie β go shrink something pretty π
β¨ and yeah, this was the pixshrink page from the BRL-CAD crew (version vibes courtesy of the BRL-CAD source/distribution, dated right there in the 1990-2026 copyright window). mwah, bye π«Άπ
π¦ 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