Linux command
pamenlarge 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Enlarge image 2x
pamenlarge 2 [input.pam] > [output.pam]
Enlarge image 4x
pamenlarge 4 [input.pam] > [output.pam]
Enlarge using named option
pamenlarge -scale=[3] [input.pam] > [output.pam]
Enlarge with different x/y factors
pamenlarge -xscale=[3] -yscale=[2] [input.pam] > [output.pam]
Enlarge horizontally only
pamenlarge -xscale=[4] [input.pam] > [output.pam]
说明
pamenlarge reads a Netpbm image, replicates its pixels N times, and produces an enlarged Netpbm image. Each pixel becomes an N x N block of identical pixels. This produces a blocky/pixelated look, useful for pixel art or simple scaling. For smooth scaling, use pamscale instead. For scale factors of 3 or more, applying pnmsmooth afterward can reduce pixelation. For PBM images, optimized algorithms exist for scale factors up to 10. Running multiple passes with smaller factors can be faster than a single large factor.
参数
- -scale=_N_
- Scale factor applied both horizontally and vertically. Cannot be combined with -xscale or -yscale.
- -xscale=_N_
- Horizontal scale factor. If -yscale is not given, vertical scaling defaults to 1.
- -yscale=_N_
- Vertical scale factor. If -xscale is not given, horizontal scaling defaults to 1.
FAQ
What is the pamenlarge command used for?
pamenlarge reads a Netpbm image, replicates its pixels N times, and produces an enlarged Netpbm image. Each pixel becomes an N x N block of identical pixels. This produces a blocky/pixelated look, useful for pixel art or simple scaling. For smooth scaling, use pamscale instead. For scale factors of 3 or more, applying pnmsmooth afterward can reduce pixelation. For PBM images, optimized algorithms exist for scale factors up to 10. Running multiple passes with smaller factors can be faster than a single large factor.
How do I run a basic pamenlarge example?
Run `pamenlarge 2 [input.pam] > [output.pam]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -scale=_N_ do in pamenlarge?
Scale factor applied both horizontally and vertically. Cannot be combined with -xscale or -yscale.