PIXINTERP2X(1)

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

🌸 PIXINTERP2X(1) β€” the glow-up tool for your pix files 🌸

okay bestie, so this is a page from the BRL-CAD manual set β€” pixinterp2x β€” and it's literally the "make my image twice as big, but make it smooth" girlie. let's get into it πŸ’…


✨ NAME ✨

pixinterp2x β€” interpolates a color pix file up to twice the original resolution. that's it, that's the whole personality πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

pixinterp2x [-s squarefilesize] [-w file_width] [-n file_height] [-h | -?] [infile.pix] > outfile.pix

πŸ’– DESCRIPTION πŸ’–

so pixinterp2x reads a pix(5) file and pops out an image with twice as many pixels in each direction, by doing a bilinear interpolation between the pixels of the input. no cap, that's the whole vibe. πŸ”₯

the input can come in two ways, bestie: either as a file argument, or piped in on standard input. the doubled image goes straight to standard output. choose your fighter 🫢

here's the iconic detail: the interpolated scanlines land exactly half way between the input lines, and the original input lines are preserved exactly. and instead of extrapolating past the edges of the image (rude), the first row and column are duplicated β€” that's the left and bottom edges. πŸ“Œ this is a whole different behavior from pixscale(1), just so you know. iykyk.

also it's a very fast implementation of one special case of interpolation. if you want the general tool for arbitrary rescaling, that's pixscale(1) β€” she's the flexible one. and real talk: doubling the resolution adds no new image information (it can't invent pixels, duh), but it's genuinely useful when you're driving a display at its highest resolution β€” like, say, when you're photographing an image. πŸ“Έβœ¨

the default input dimensions are 512 by 512 pixels. cute, standard, love that for us.


πŸ‘‘ OPTIONS πŸ‘‘

  • -s squarefilesize β€” sets both the width and height of the input image to squarefilesize pixels. one number, two dimensions, efficiency queen πŸ’…
  • -w file_width β€” sets the width (in pixels) of the scanlines in the input file. the default is 512.
  • -n file_height β€” sets the number of scanlines of input to be processed. the default is 512.
  • -h, -? β€” prints a usage message and exits. your little help flag πŸŽ€

🌈 EXAMPLES 🌈

Example 1. Double a 1024x768 image and view the result

pixinterp2x -w 1024 -n 768 render.pix | pix-fb -w 2048 -n 1536

this one interpolates a 1024x768 rendering up to 2048x1536 and pipes it directly to the framebuffer with pix-fb(1) so you can inspect it β€” no intermediate file written. stream it and go, periodt πŸ’¨

Example 2. Upscale a square image and save it

pixinterp2x -s 256 small.pix > large.pix

reads a 256x256 pix(5) image and writes out a smoothly interpolated 512x512 image. glow-up complete βœ¨πŸ¦‹


🧚 SEE ALSO 🧚

brlcad(1), pixscale(1), pix-fb(1), pix(5)


πŸ’€ BUGS πŸ’€

more memory is used than is strictly necessary. she's a lil extra, we forgive her πŸ™ˆ


πŸ’œ AUTHOR πŸ’œ

BRL-CAD Team


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 πŸ“¬


okay that's the whole page bestie β€” go forth and double those pixels 🫢

and that's a wrap! this came to you from the BRL-CAD crew πŸ’– no date on this one, she's timeless, and the page answers to the name PIXINTERP2X(1) β€” mwah πŸ’‹

πŸ“¦ where this page comes from