Linux command
pbm 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Inspect a PBM file's
pnmfile [image.pbm]
Convert a PBM to ASCII art
pbmtoascii [image.pbm]
Convert any image to PBM
anytopnm [input] | pamditherbw | pnmtopnm > [output.pbm]
Convert PBM to PNG
pnmtopng [image.pbm] > [image.png]
说明
PBM (Portable Bitmap) is the simplest of the Netpbm formats, storing 1-bit (black-and-white) raster images. It comes in two variants: a plain ASCII form (magic number P1) and a binary form (magic number P4). The header records the format, width, and height; pixel data follows, with 0 representing white and 1 representing black. PBM is a lossless format intended as a least-common-denominator for image processing pipelines: nearly every Netpbm utility can read and write it, making it useful as an intermediate format when chaining conversion tools.
FAQ
What is the pbm command used for?
PBM (Portable Bitmap) is the simplest of the Netpbm formats, storing 1-bit (black-and-white) raster images. It comes in two variants: a plain ASCII form (magic number P1) and a binary form (magic number P4). The header records the format, width, and height; pixel data follows, with 0 representing white and 1 representing black. PBM is a lossless format intended as a least-common-denominator for image processing pipelines: nearly every Netpbm utility can read and write it, making it useful as an intermediate format when chaining conversion tools.
How do I run a basic pbm example?
Run `pnmfile [image.pbm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more pbm examples?
This page includes 4 examples for pbm, plus related commands for nearby Linux tasks.