Crop PPM images online for free. Isolate regions of interest from scientific and processed images.
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 |
pamcut| In this editor | What it does | Equivalent pamcut flag |
|---|---|---|
| Left offset — no typed field; drag the box (arrow keys nudge) | Number of columns trimmed from the left | -left |
| Top offset — no typed field; drag the box (arrow keys nudge) | Number of rows trimmed from the top | -top |
| "Crop area" W (px) | Output column count | -width |
| "Crop area" H (px) | Output row count | -height |
| Drag selection on preview | Places and sizes the box visually | (none — this is GUI only) |
In pamcut, coordinates are inclusive of the starting pixel: -left 10 -top 20 -width 100 keeps columns 10–109 and rows 20 onward, matching the row-major top-to-bottom raster order documented in the PPM specification.
Not for a standard 8-bit PPM (Maxval 255). Cropping is a pixel selection operation — the kept pixels are written to the output unchanged. There is no resampling and no compression artifact (PPM has no compression to begin with), so the RGB triplets in the cropped region are byte-for-byte identical to the source raster. The output is always written with Maxval 255, so a file with any other Maxval (for example a 16-bit one) is rescaled to 8-bit.
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 always written as P6 (a P3 input is saved as P6) — open the file in a text editor and you'll see the P6\n<width> <height>\n<maxval>\n header followed by binary data.
No. A PPM edited in your browser is redrawn in 8-bit colour, and the editor has no bit-depth setting, so a 16-bit PPM (Maxval 256–65535) comes out as 8-bit. For astronomy, HDR or scientific captures that need the full Maxval, crop with a tool that keeps 16 bits (ImageMagick, GIMP, pnmcut from Netpbm) and keep the original.
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 is GUI-based — drag-to-select the region, with typed Width/Height fields for exact sizing (there's no typed X/Y position field, so placement is by dragging). There's nothing to install, and it now batches up to 50 files at once with the same crop applied to each; for scripted automation with explicit -left/-top offsets, pamcut on the command line is still an option.
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 the resolution in the Resize tab, or convert to PPM to PNG for lossless 50–70% additional shrinkage. (A 16-bit PPM already comes out 8-bit, which halves it.)
Yes — drop up to 50 PPM files at once (a mixed batch works too). The crop region (or aspect-ratio preset) you set applies to every file in the batch; "Download all (.zip)" saves every cropped result in one ZIP, or use "Download one by one" to save them separately.
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, type Width=floor(W/2) and Height=floor(H/2) into the W and H boxes under "Crop area", then drag the crop box to the top-left corner — there's no typed X/Y field, so you place the box by dragging (arrow keys nudge it) and confirm the position visually on the preview.