Resizing one image shouldn't mean opening an editor or memorizing an ImageMagick incantation. pixr is a single cross-platform binary: point it at an input and an output, optionally give it a size and a mode, and it does the obvious thing — format conversion included, inferred from the output filename.
fit keeps aspect ratio inside your box, fill keeps aspect ratio and crops the excess, stretch hits the exact dimensions. Padding color is yours to pick.
Read and write JPEG, PNG, GIF, BMP, TIFF, WebP, AVIF, ICO, and ICNS. Even reads HEIC/HEIF and JPEG XL straight off your phone or camera.
pixr input.jpg output.png just works. Sensible defaults (800×512, quality 85, fit mode) — override only what you need.
scoop bucket add rocky https://github.com/i-rocky/scoop-bucket scoop install pixr
brew tap i-rocky/tap && brew install pixr
Grab a prebuilt binary from GitHub Releases —
darwin, linux, and windows builds for x86_64 and aarch64 — and drop it on your PATH.
pixr -i input.jpg -o output.png -w 800 -H 600 # explicit flags pixr -i input.jpg -o output.png -s 800x600 # combined size pixr input.jpg output.png -w 800 -H 600 # positional input/output pixr input.jpg output.png # defaults: 800x512, fit, q85
| Flag | What it does | Default |
|---|---|---|
-i, --input | input image file (or first positional argument) | — |
-o, --output | output image file (or second positional argument) | — |
-w, --width | target width | 800 |
-H, --height | target height | 512 |
-s, --size | target size as WIDTHxHEIGHT (e.g. 512x512) | — |
-m, --mode | resize mode: fit, fill, or stretch | fit |
-q, --quality | output quality for lossy formats (1–100) | 85 |
-f, --format | output format (jpg, png, gif, …) | from output filename |
-p, --pad-color | padding color in hex (#RRGGBB) | #FFFFFF |
-?, --help | show help | — |
--version | print version | — |
| Format | Read | Write |
|---|---|---|
JPEG (.jpg, .jpeg) | ✅ | ✅ |
PNG (.png) | ✅ | ✅ |
GIF (.gif) | ✅ | ✅ |
BMP (.bmp) | ✅ | ✅ |
TIFF (.tiff, .tif) | ✅ | ✅ |
WebP (.webp) | ✅ | ✅ |
AVIF (.avif) | ✅ | ✅ |
ICO (.ico) | ✅ | ✅ |
ICNS (.icns) | ✅ | ✅ |
HEIC/HEIF (.heic, .heif) | ✅ | read-only |
JPEG XL (.jxl) | ✅ | read-only |
HEIC/HEIF and JPEG XL sources can be read but must be written to a fully supported
output format (PNG, JPEG, WebP, …) — the underlying decoders don't encode.
JPEG 2000 (.jp2) is not supported in either direction.