LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pnmcrop

Automatically crop borders from PNM images

TLDR

Crop borders from image
$ pnmcrop [input.pnm] > [output.pnm]
copy
Crop only white borders
$ pnmcrop -white [input.pnm] > [output.pnm]
copy
Crop only black borders
$ pnmcrop -black [input.pnm] > [output.pnm]
copy
Crop specific sides
$ pnmcrop -left -right [input.pnm] > [output.pnm]
copy

SYNOPSIS

pnmcrop [options] [file]

DESCRIPTION

pnmcrop automatically detects and removes uniform-color borders from PNM images. It identifies rows and columns at the edges that consist entirely of the border color and trims them.By default it detects the border color automatically, but -white and -black force specific border colors. Individual sides can be cropped selectively with -left, -right, -top, and -bottom flags. Part of the Netpbm toolkit.

PARAMETERS

FILE

Input PNM file.
-white
Crop white borders.
-black
Crop black borders.
-left
Crop left side only.
-right
Crop right side only.
-top
Crop top only.
-bottom
Crop bottom only.
-verbose
Show cropping information.

INSTALL

sudo apt install netpbm
copy
sudo dnf install netpbm
copy
sudo pacman -S netpbm
copy
sudo apk add netpbm
copy
sudo zypper install netpbm
copy
brew install netpbm
copy
nix profile install nixpkgs#netpbm
copy

CAVEATS

Border color must be uniform. Part of Netpbm suite.

HISTORY

pnmcrop was created as part of Netpbm for automatic image border removal.

SEE ALSO

pnmcut(1), pnmpad(1), pamcut(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid