Linux command
pamtopnm 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Convert PAM to PNM format
pamtopnm [input.pam] > [output.pnm]
Convert, overriding tuple type check with -assume
pamtopnm -assume [input.pam] > [output.pnm]
Convert silently without informational messages
pamtopnm -quiet [input.pam] > [output.pnm]
说明
pamtopnm reads a PAM image as input and produces an equivalent PBM, PGM, or PPM (i.e. PNM) image as output. The output format is chosen automatically based on the input: BLACKANDWHITE becomes PBM, GRAYSCALE becomes PGM, and RGB becomes PPM. If the input PAM does not have an appropriate tuple type (BLACKANDWHITE, GRAYSCALE, or RGB) and depth, pamtopnm fails unless -assume is specified. To force conversion of images with extra channels, run the input through pamchannel first to select the desired channels. Part of the Netpbm toolkit.
参数
- -assume
- Override the tuple type requirement. Asserts that the tuples contain valid PBM, PGM, or PPM data regardless of the PAM tuple type. The depth must still conform to the target format.
- -quiet
- Suppress informational messages to standard error.
FAQ
What is the pamtopnm command used for?
pamtopnm reads a PAM image as input and produces an equivalent PBM, PGM, or PPM (i.e. PNM) image as output. The output format is chosen automatically based on the input: BLACKANDWHITE becomes PBM, GRAYSCALE becomes PGM, and RGB becomes PPM. If the input PAM does not have an appropriate tuple type (BLACKANDWHITE, GRAYSCALE, or RGB) and depth, pamtopnm fails unless -assume is specified. To force conversion of images with extra channels, run the input through pamchannel first to select the desired channels. Part of the Netpbm toolkit.
How do I run a basic pamtopnm example?
Run `pamtopnm [input.pam] > [output.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -assume do in pamtopnm?
Override the tuple type requirement. Asserts that the tuples contain valid PBM, PGM, or PPM data regardless of the PAM tuple type. The depth must still conform to the target format.