Linux command
ppmquant 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Reduce to N colors
ppmquant [256] [input.ppm] > [output.ppm]
Reduce to 16 colors
ppmquant [16] [input.ppm] > [output.ppm]
With Floyd-Steinberg dithering
ppmquant -fs [256] [input.ppm] > [output.ppm]
Use existing colormap
ppmquant -map [palette.ppm] [input.ppm] > [output.ppm]
说明
ppmquant reduces the number of colors in a PPM image using median-cut quantization. Essential for creating GIF images or reducing file size. Superseded by pnmquant in modern Netpbm.
参数
- ncolors
- Maximum number of colors.
- -fs
- Floyd-Steinberg dithering.
- -map _file_
- Use colormap from file.
- -spreadbrightness
- Spread by brightness.
- -spreadluminosity
- Spread by luminosity.
FAQ
What is the ppmquant command used for?
ppmquant reduces the number of colors in a PPM image using median-cut quantization. Essential for creating GIF images or reducing file size. Superseded by pnmquant in modern Netpbm.
How do I run a basic ppmquant example?
Run `ppmquant [256] [input.ppm] > [output.ppm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does ncolors do in ppmquant?
Maximum number of colors.