← 返回命令列表

Linux command

ppmtogif 命令

文本

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

常用示例

Convert PPM to GIF

ppmtogif [input.ppm] > [output.gif]

With transparency

ppmtogif -transparent [color] [input.ppm] > [output.gif]

Interlaced GIF

ppmtogif -interlace [input.ppm] > [output.gif]

With alpha transparency

ppmtogif -alpha [mask.pgm] [input.ppm] > [output.gif]

说明

ppmtogif converts PPM images to GIF format. GIF is limited to 256 colors, so use ppmquant first if needed. This program was superseded by pamtogif in Netpbm 10.37 (December 2006). New use of ppmtogif is discouraged; use pamtogif instead. Part of the Netpbm toolkit.

参数

-transparent =_color_
Make the specified color transparent. If prefixed with =, only an exact match is used; otherwise the closest color in the image is selected.
-alpha _pgmfile_
Use a PGM file as an alpha (transparency) mask. White is opaque, black is transparent. Cannot be used with -transparent.
-interlace
Produce an interlaced GIF file.
-sort
Produce a GIF file with the colormap sorted in a predictable order.
-map _mapfile_
Use colors from the specified PPM file as the colormap instead of the colors in the input image.
-comment _text_
Include a comment in the GIF output.
-nolzw
Do not use LZW compression. Produces larger but unencumbered output.

FAQ

What is the ppmtogif command used for?

ppmtogif converts PPM images to GIF format. GIF is limited to 256 colors, so use ppmquant first if needed. This program was superseded by pamtogif in Netpbm 10.37 (December 2006). New use of ppmtogif is discouraged; use pamtogif instead. Part of the Netpbm toolkit.

How do I run a basic ppmtogif example?

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

What does -transparent =_color_ do in ppmtogif?

Make the specified color transparent. If prefixed with =, only an exact match is used; otherwise the closest color in the image is selected.