← 返回命令列表

Linux command

pamtopng 命令

文本

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

常用示例

Convert PAM to PNG

pamtopng [input.pam] > [output.png]

Convert with maximum compression

pamtopng -compression [9] [input.pam] > [output.png]

Create interlaced PNG

pamtopng -interlace [input.pam] > [output.png]

Convert with transparency

pamtopng -transparent [white] [input.pam] > [output.png]

说明

pamtopng converts Netpbm PAM images to PNG format. It is the preferred tool over pnmtopng for images with alpha channels, as it properly handles PAM's native alpha support. Part of the Netpbm toolkit. Input is read from the specified file or standard input. Output is written to standard output.

参数

-compression _n_
Compression level (0-9, default: 6).
-interlace
Create interlaced (Adam7) PNG for progressive loading.
-transparent _color_
Set fully transparent color.
-background _color_
Background color for alpha blending.
-gamma _value_
Gamma value for the image.
-srgbintent _intent_
sRGB rendering intent: absolute, relative, perceptual, or saturation.
-text _file_
Add tEXt chunks from a text file.
-verbose
Print detailed progress information to standard error.

FAQ

What is the pamtopng command used for?

pamtopng converts Netpbm PAM images to PNG format. It is the preferred tool over pnmtopng for images with alpha channels, as it properly handles PAM's native alpha support. Part of the Netpbm toolkit. Input is read from the specified file or standard input. Output is written to standard output.

How do I run a basic pamtopng example?

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

What does -compression _n_ do in pamtopng?

Compression level (0-9, default: 6).