← 返回命令列表

Linux command

pamdepth 命令

文本

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

常用示例

Reduce to 8-bit

pamdepth [255] [input.pam] > [output.pam]

Promote to 16-bit

pamdepth [65535] [input.pam] > [output.pam]

Reduce to 1-bit

pamdepth [1] [input.pam] > [output.pam]

Read from stdin via pipe

pnmtopam [input.ppm] | pamdepth [255] > [output.pam]

说明

pamdepth rescales the maxval (per-sample resolution) of a Netpbm/PAM image. Increasing the maxval is lossless; decreasing it loses precision but never changes the image's tuple type or width/height. If the input already has the requested maxval, pamdepth copies it through unchanged. Use pamdepth 1 to drop a grayscale image down to bilevel, or pamdepth 65535 to widen an 8-bit image so subsequent processing avoids quantization.

FAQ

What is the pamdepth command used for?

pamdepth rescales the maxval (per-sample resolution) of a Netpbm/PAM image. Increasing the maxval is lossless; decreasing it loses precision but never changes the image's tuple type or width/height. If the input already has the requested maxval, pamdepth copies it through unchanged. Use pamdepth 1 to drop a grayscale image down to bilevel, or pamdepth 65535 to widen an 8-bit image so subsequent processing avoids quantization.

How do I run a basic pamdepth example?

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

Where can I find more pamdepth examples?

This page includes 4 examples for pamdepth, plus related commands for nearby Linux tasks.