RESAMPLE_IMAGE(1)

πŸ“¦
version 3.29.1 Β· 3 versions
, in fedora 44

✨ RESAMPLE_IMAGE ✨

okay bestie, so this is resample_image from the User Commands manual, section 1, and it's literally the glow-up tool for your images β€” you feed it pixels, it gives you pixels in a whole new size. πŸ’…


πŸŽ€ NAME πŸŽ€

resample_image β€” bestie it's resample_image. iconic, no notes, that's the name. πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

the vibe check first, here's how you call it:

usage: resample_image (--shape|--dim|--reference) [options] input output

what it does: Resample an image to different dimensions. that's it, that's the whole personality. 🌸

🌈 positional arguments 🌈

  • input β€” the input image, your before pic 🫢
  • output β€” the output image, your after pic ✨

πŸ¦‹ options πŸ¦‹

  • -h, --help β€” show this help message and exit. the classic. the "wait what do i do" button 😭
  • -i, --interp {nearest,linear,cubic} β€” Interpolation (default: linear). pick your vibe for how the in-between pixels get invented 🧚
  • -o, --origin {centre,corner} β€” Resampling origin (default: centre). where the resampling anchors itself, basically where the main character stands πŸ‘‘
  • -dt, --dtype {char,short,int,float,double} β€” Data type (default: data type of input image). so if you don't say anything it just matches the input, lowkey polite of it πŸ’œ
  • -n, --nosmooth β€” Do not smooth image when downsampling. turning the smoothness OFF, feral mode, we respect it πŸ™ˆ

πŸ“ Resampling destination πŸ“

Specify the resampling destination space using one of the following options. and heads up bestie, big note incoming:

Note that the --reference option will cause the field-of-view of the input image to be changed to that of the reference image. so like, not just the size, the actual field-of-view, fr fr. πŸ‘€
  • -s, --shape X,Y,Z,... β€” Output shape. you're saying exactly how big it should be, dimension by dimension πŸ’–
  • -d, --dim X,Y,Z,... β€” Output voxel dimensions. sizing it by the voxels themselves instead ⭐
  • -r, --reference IMAGE β€” Resample input to the space of this reference image(overrides --origin). so it just copies the reference's whole setup, and yes it overrides --origin, so don't fight it, it wins 🌺

that's the whole page bestie, every flag, every default, every brace, nothing skipped πŸ’―


resample_image 3.29.1 β€” August 2026 β€” mwah, that's a wrap, go resample something gorgeous πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from