pbmmask
creates a mask bitmap from the outline of shapes in a PBM image
TLDR
Create mask from bitmap edges
$ pbmmask [input.pbm] > [output.pbm]
Expand mask by pixels$ pbmmask -expand [2] [input.pbm] > [output.pbm]
SYNOPSIS
pbmmask [options] [file]
DESCRIPTION
pbmmask creates a mask bitmap from the outline of shapes in a PBM image. Useful for creating selection masks or outlines. Part of Netpbm toolkit.
PARAMETERS
-expand n
Expand mask by n pixels.
INSTALL
sudo apt install netpbm
sudo dnf install netpbm
sudo pacman -S netpbm
sudo apk add netpbm
sudo zypper install netpbm
brew install netpbm
nix profile install nixpkgs#netpbm
SEE ALSO
ppmcolormask(1), pbmtext(1)