Crop PPM images online for free. Isolate regions of interest from scientific and processed images.
.ppm image. Both raw P6 (binary) and plain P3 (ASCII) variants are accepted, including 8-bit and 16-bit Maxval files. Only the first file you pick is loaded — this editor works on one image at a time, not a batch queue.pamcut, ImageMagick, and the underlying Netpbm row order.PPM (Portable PixMap) is the color image member of the Netpbm family — a "lowest common denominator" raster format whose header carries only a magic number (P6 raw or P3 ASCII), width, height, and Maxval, followed by uncompressed RGB pixel data. Because every pixel costs 3 bytes at 8-bit Maxval (or 6 bytes at 16-bit), files balloon fast: a 1920×1080 P6 image is roughly 6 MB before any header overhead. Cropping removes pixels you don't need — the only meaningful way to shrink a PPM without changing format or precision.
cjpeg/djpeg. Cropping to the analysis window lets downstream code skip irrelevant pixels.ppmtopgm, pnmscale, pnmcomp, and friends often produce images with padding or framing artifacts. A precise crop fits cleanly between any two stages of a cat in.ppm | pnmscale | pnmcrop > out.ppm-style pipeline.scrot --format ppm and xwdtopnm write screenshots in Netpbm formats; cropping isolates a single window or panel without touching pixel values.pnmcrop failed leftovers — pnmcrop only removes uniform-colored borders; mixed or noisy edges defeat it. A coordinate-based crop catches the cases pnmcrop misses.| Property | PPM (P6) | PNG | TIFF (uncompressed) | BMP |
|---|---|---|---|---|
| Compression | None | Deflate (lossless) | None / LZW / Deflate | None (typically) |
| Color depth | 1–16 bits per channel (Maxval 1–65535) | 8 / 16 bits per channel | 1–32 bits per channel | 1 / 4 / 8 / 24 / 32 bits |
| Header complexity | Minimal — magic / W / H / Maxval | Chunked, with metadata | Tagged (TIFF tags) | DIB header |
| Alpha channel | No (use PAM for alpha) | Yes | Yes | Limited |
| 1920×1080 8-bit size | ~5.93 MB raw | ~2–5 MB | ~6–12 MB | ~5.93 MB |
| Typical use | Netpbm pipelines, CV research, scientific tools | Web, archival, screenshots | Print, archival, microscopy | Windows legacy software |
| Input | What it does | Equivalent pamcut flag |
|---|---|---|
| X (left offset, px) | Number of columns trimmed from the left | -left |
| Y (top offset, px) | Number of rows trimmed from the top | -top |
| Width (px) | Output column count | -width |
| Height (px) | Output row count | -height |
| Drag selection on preview | Visual equivalent of the four numbers above | (none — this is GUI only) |
Coordinates are inclusive of the starting pixel: an X=10, Y=20, Width=100 crop keeps columns 10–109 and rows 20 onward, matching the row-major top-to-bottom raster order documented in the PPM specification.
No. Cropping is a pixel selection operation — the kept pixels are written to the output unchanged. There is no resampling, no requantization, and no compression artifact (PPM has no compression to begin with). The Maxval, bit depth, and exact RGB triplets in the cropped region are byte-for-byte identical to the source raster.
P6 stores each sample as 1 or 2 raw binary bytes; P3 stores each sample as ASCII decimal text separated by whitespace. Both encode the same pixels, but P6 is roughly 3–5x smaller and faster to read. The Netpbm spec describes P6 as "the format above, which generally considered the normal one." Cropped output from xconvert is written as P6 by default — open the file in a text editor and you'll see the P6\n<width> <height>\n<maxval>\n header followed by binary data.
Yes — 16-bit PPM (Maxval 256–65535, where each sample takes 2 bytes) is preserved through cropping. The output keeps the original Maxval and per-channel bit depth unless you explicitly change Bit Depth to 8-bit in the compression options. Astronomy and HDR scientific captures should leave Bit Depth alone.
pamcut and pnmcrop command-line tools?pamcut is the Netpbm tool for coordinate-based cropping (-left, -right, -top, -bottom, -width, -height flags); pnmcrop only auto-removes uniform-colored borders and fails on noisy edges. xconvert's tool combines both modes — drag-to-select like a GUI, or enter exact pixel coordinates equivalent to pamcut flags. There's nothing to install, though it works on one file at a time rather than a whole batch; for scripted batches of files, pamcut on the command line is still the faster path.
Yes, proportionally. Because PPM is uncompressed, file size scales linearly with pixel count: cropping to 50% of the area produces a file 50% smaller. For larger reductions, also lower resolution under the resize options, drop Bit Depth from 16-bit to 8-bit (halves the file), or convert to PPM to PNG for lossless 50–70% additional shrinkage.
Not on this page, and not anywhere on xconvert today — cropping isn't part of the batch-capable server-side tools. The editor here holds one file at a time: set the X/Y/Width/Height, crop, save, then + Start New and re-enter the same coordinates for the next file. For fixed-camera capture sets, stereo pairs, or sequential frames from a CV pipeline, that means repeating the same numbers — or scripting pamcut locally if the set is large.
This page handles PPM specifically. For grayscale (PGM) or bilevel (PBM) Netpbm files, convert through PNG to PPM or use the corresponding format-specific tools. PAM (Portable Arbitrary Map, which adds an alpha channel) is not part of this tool's accepted extensions.
If a downstream tool (ImageMagick script, OpenCV pipeline, academic dataset loader) requires PPM, crop in PPM. For everything else, the cropped result is smaller and more universally readable as PNG — try PPM to PNG after cropping, or use crop PNG on a converted file. Either order produces identical pixel data because all three operations (crop, PNG encode, no resample) are lossless.
The PPM header lists width and height as the second and third values (in ASCII decimal). For the top-left quarter: X=0, Y=0, Width=floor(W/2), Height=floor(H/2). The drag-to-select preview shows live coordinates while you drag, which is usually the fastest way to locate a region of interest visually.