← 返回命令列表

Linux command

pnmindex 命令

文本

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

常用示例

Create image index

pnmindex [image1.pnm] [image2.pnm] [image3.pnm] > [index.pnm]

Specify size

pnmindex -size [100] [*.pnm] > [index.pnm]

With a title

pnmindex -title ["My Gallery"] [*.pnm] > [index.pnm]

Multiple columns

pnmindex -across [4] [*.pnm] > [index.pnm]

说明

pnmindex creates a visual index (contact sheet) from multiple PNM images. Each image is scaled to a thumbnail and arranged in a grid. Useful for creating image previews and galleries.

参数

-size _n_
Maximum thumbnail size in pixels. Each image is scaled to fit within an N x N box while preserving aspect ratio. Default: 100.
-across _n_
Number of thumbnails per row. Default: 6.
-colors _n_
Maximum number of colors in the output image. Default: 256.
-title _title_
Add a title string at the top of the image.
-black
Use black background with white labels instead of the default white background with black labels.
-noquant
Disable color quantization. By default, colors are reduced for PPM input.
-quant
Enable color quantization (default for PPM input).
-quiet
Suppress informational messages.

FAQ

What is the pnmindex command used for?

pnmindex creates a visual index (contact sheet) from multiple PNM images. Each image is scaled to a thumbnail and arranged in a grid. Useful for creating image previews and galleries.

How do I run a basic pnmindex example?

Run `pnmindex [image1.pnm] [image2.pnm] [image3.pnm] > [index.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -size _n_ do in pnmindex?

Maximum thumbnail size in pixels. Each image is scaled to fit within an N x N box while preserving aspect ratio. Default: 100.