← 返回命令列表

Linux command

pngtopnm 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Convert PNG to PNM

pngtopnm [input.png] > [output.pnm]

Extract alpha to separate file

pngtopnm -alpha [input.png] > [alpha.pgm]

说明

pngtopnm converts PNG images to PNM (PBM/PGM/PPM) format. Part of Netpbm toolkit for image conversion. Output type depends on PNG color depth.

参数

-alpha
Extract alpha channel as PGM.
-mix
Mix with background color.
-background _color_
Background color for mixing.
-verbose
Verbose output.

FAQ

What is the pngtopnm command used for?

pngtopnm converts PNG images to PNM (PBM/PGM/PPM) format. Part of Netpbm toolkit for image conversion. Output type depends on PNG color depth.

How do I run a basic pngtopnm example?

Run `pngtopnm [input.png] > [output.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -alpha do in pngtopnm?

Extract alpha channel as PGM.