PIXROT(1)
π PIXROT(1) β the BRL-CAD glow-up β¨
okay bestie, so this is pixrot, page 1 of the BRL-CAD manuals, and it is literally the rotate/invert/reverse girlie for your color pix files π
πΈ NAME πΈ
pixrot β rotates, inverts, or reverses a color pix file. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
pixrot [-f] [-b] [-r] [-i] [-#bytes] [-s squaresize] [-w width] [-n height] [file.pix] > newfile.pix
read it, learn it, love it π«Ά note the > newfile.pix β output goes to stdout, so you redirect it, mwah.
π« DESCRIPTION π«
so pixrot rotates, inverts, and/or reverses a pix(5) format color image. it reads from the named file, or from standard input if you don't name one, and writes the result to standard output. no cap, that's the whole vibe.
the input dimensions come from -w (width) and -n (height), or from -s when your image is square. both default to 512, so if you forget, she assumes 512. iconic but also, like, pay attention π
- the
-rflag reverses each scan line left to right π¦ -iinverts the image top to bottom π
and then the icons:
-fand-brotate the image ninety degrees forward or backward respectively. the sense is relative to a first-quadrant coordinate system (origin lower left), with "forward" meaning clockwise β° iykyk- a 180 degree rotation? that's just both reversing and inverting. two flags, one flip, slay π
by default, three-byte (RGB) pixels are assumed. the -# bytes flag selects a different element size β so the same program can rotate rectangular arrays of any fixed-width datum, like floating point values or fixed-width text. she's not just a pretty face, she's versatile π
now the important caveat, listen up: the output is written largely in scan-line order. if the image is too large to hold in memory at once, pixrot seeks on output β so for the rotation modes, standard output must be a seekable file rather than a pipe. like, a pipe is not it, bestie. > file yes, | no π
π OPTIONS π
-fβ rotate the image ninety degrees forward (clockwise) β°-bβ rotate the image ninety degrees backward (counter-clockwise) π-rβ reverse each scan line left to right π¦-iβ invert the image top to bottom π-# bytesβ set the number of bytes per pixel (default3, as inpix(5)) π-s squaresizeβ set both the input width and height tosquaresizepixels (also-S)-w widthβ set the input width in pixels (default512, also-W)-n heightβ set the input number of scan lines in pixels (default512, also-N)-hβ print a usage message π«Ά
ngl the uppercase aliases-S,-Wand-Nare right there in the options list, so use 'em if that's your thing π
π₯ EXAMPLES π₯
β Example 1. Rotate a rendered frame and view it
rt -o frame.pix -w 1024 -n 768 model.g component.r
pixrot -w 1024 -n 768 -f frame.pix > frame-rot.pix
pix-png -w 768 -n 1024 frame-rot.pix > frame-rot.png
so first you render a 1024x768 image with rt(1), then you rotate it ninety degrees clockwise β and notice the rotated image is 768x1024, because obviously the dimensions swap, duh π
β then you convert it to PNG with pix-png(1). the way that pipeline just works ππ
β Example 2. Flip an image 180 degrees
pixrot -s 512 -r -i image.pix > image-180.pix
combine a left-to-right reversal with a top-to-bottom inversion to turn a 512x512 image upside down. that's the 180, bestie, no rotation flag needed πβ¨
π SEE ALSO π
brlcad(1), bwrot(1), pixscale(1), pixrect(1), pix-png(1), pix(5)
go read the whole friend group, they're all iconic π
π AUTHOR π
BRL-CAD Team β legends, honestly π«Ά
π 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 π§ don't be shy, they want to know π
and that's the page!! this was PIXROT(1) from the BRL-CAD manual set β source/version: BRL-CAD, page PIXROT(1), footer dated as shown above β mwah, go rotate something πβ¨
π¦ 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