← 返回命令列表

Linux command

pnmfile 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Show image information

pnmfile [image.pnm]

Show info for multiple files

pnmfile [file1.pnm] [file2.pnm]

Machine-readable output

pnmfile -machine [image.pnm]

说明

pnmfile displays information about PNM image files including the format type (PBM, PGM, or PPM), dimensions (width and height), maximum sample value, and whether the file uses ASCII (plain) or binary (raw) encoding. The -machine flag outputs in a parseable format suitable for scripting. Part of the Netpbm toolkit; superseded by pamfile, which also handles PAM format files.

参数

-machine
Machine-readable output format, printing type, width, height, depth, and maxval as space-separated values.

FAQ

What is the pnmfile command used for?

pnmfile displays information about PNM image files including the format type (PBM, PGM, or PPM), dimensions (width and height), maximum sample value, and whether the file uses ASCII (plain) or binary (raw) encoding. The -machine flag outputs in a parseable format suitable for scripting. Part of the Netpbm toolkit; superseded by pamfile, which also handles PAM format files.

How do I run a basic pnmfile example?

Run `pnmfile [image.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -machine do in pnmfile?

Machine-readable output format, printing type, width, height, depth, and maxval as space-separated values.