← 返回命令列表

Linux command

netpbm 命令

文本

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

常用示例

Convert JPEG to PPM

jpegtopnm [image.jpg] > [image.ppm]

Convert PNG to PPM

pngtopam [image.png] > [image.ppm]

Convert PPM to JPEG

pnmtojpeg [image.ppm] > [image.jpg]

Resize image

pamscale -width [800] [input.ppm] > [output.ppm]

Flip image

pamflip -lr [input.ppm] > [output.ppm]

说明

netpbm is a toolkit of over 350 separate programs for manipulation of graphic images, including conversion between about 100 graphics formats. The programs use PNM (Portable Any Map) and PAM as intermediate formats for pipeline-based image processing. The tools are designed for command-line use and pipeline composition. A typical workflow converts an input format to PNM, applies transformations, then converts to an output format. Each tool does one thing, and they are most powerful when combined in shell pipelines.

FAQ

What is the netpbm command used for?

netpbm is a toolkit of over 350 separate programs for manipulation of graphic images, including conversion between about 100 graphics formats. The programs use PNM (Portable Any Map) and PAM as intermediate formats for pipeline-based image processing. The tools are designed for command-line use and pipeline composition. A typical workflow converts an input format to PNM, applies transformations, then converts to an output format. Each tool does one thing, and they are most powerful when combined in shell pipelines.

How do I run a basic netpbm example?

Run `jpegtopnm [image.jpg] > [image.ppm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more netpbm examples?

This page includes 5 examples for netpbm, plus related commands for nearby Linux tasks.