DECIMATE(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… DECIMATE(1) β€” the BRL-CAD one, bestie

okay so real talk, this is decimate, and she lives in the BRL-CAD family of manual pages (that's the BRL-CAD bit chilling at the top of the page, iykyk). she's small, she's focused, she does exactly one thing and she ate. πŸŽ€


✨ NAME ✨

decimate β€” reduce the resolution of an image or data file πŸ¦‹

like… she downsizes. that's the whole personality. no cap.


🌸 SYNOPSIS 🌸

decimate nbytes/pixel width height [outwidth outheight]

πŸ’– DESCRIPTION πŸ’–

okay so picture this: decimate reads a file of width by height data items from standard input, and then she throws away enough data to produce an output file of outwidth by outheight items on standard output. icon behaviour, honestly. πŸ’…

the size of each data item? that's what nbytes/pixel is for. she needs to know how chunky each pixel is before she starts yeeting samples.

if outwidth and outheight aren't provided, they both default to 512. yes bestie, both of them, 512, the whole time, that's the default. 🫢

⚠️ important vibe check: if the input image size is not an integer multiple of the output image size, the result gets padded with zero elements (pixels) on the right and top to achieve an output image of exactly the specified size. so like, she'll shove zeros in there to make it work. that's the deal, that's the contract. 😭

and for the format girlies:

  • processing a bw(5) format file? use a value of 1 for nbytes/pixel. simple. one byte. minimal. πŸ’€
  • processing a pix(5) format file? use a value of 3. three. it's giving RGB. 🌈

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Downsample a large pix image so it fits on a framebuffer πŸ‘‘

$ decimate 3 1024 1024 512 512 < input.pix | pix-fb -w 512 -n 512

so what's happening here: we're reducing a 1024x1024 pix(5) image (3 bytes/pixel, remember!) down to 512x512 by discarding every other sample and scanline, and then piping the result straight into pix-fb(1) for a quick preview of an image that's too large for the framebuffer. πŸŽ€

the way that pipeline just works… obsessed. one line, no temp files, main character energy from start to finish. ⭐


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

the BRL-CAD Team. legends, honestly. 🫢


this software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.

like… that's a long run. almost forty years of decimating. slay. πŸ‘‘


πŸ™ˆ BUG REPORTS πŸ™ˆ

found a bug? a problem? something acting sus? reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. πŸ“§

don't sit on it bestie, tell the devs. they want to know. πŸ’–


so yeah, that's the page πŸ’« β€” brought to you by BRL-CAD in this DECIMATE(1) era, and yeah, she's dated like all good manpages are, so go forth and downscale responsibly. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from